Ejemplo n.º 1
0
        public IActionResult GetSimpleByRobotId(long robotId)
        {
            var userId = Convert.ToInt64(HttpContext.User.Claims.First(c => c.Type == ClaimTypes.Sid).Value);
            var result = _scriptService.GetSimpleByRobotId(robotId, userId);

            if (result.ErrorOccured)
            {
                return(BadRequest(result));
            }

            return(Ok(result));
        }