public IActionResult GetByUser() { var userId = HttpContext.User.Claims.First(c => c.Type == ClaimTypes.Sid).Value; var result = _scriptService.GetToDisplay(Convert.ToInt64(userId)); if (result.ErrorOccured) { return(BadRequest(result)); } return(Ok(result)); }