public ActionResult <SubTaskDto> Get(int id, [FromQuery] int todoId, [FromQuery] int userId)
 {
     try
     {
         return(Ok(_subTaskService.GetSubTask(id, todoId, userId)));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }
Example #2
0
 public IHttpActionResult GetSubTask(int id, int?taskId = null)
 {
     try
     {
         SubTaskViewModel result = subTaskFactory.CreateSubTask(subTaskService.GetSubTask(id, taskId));
         return(Ok(result));
     }
     catch (ValidationException)
     {
         return(NotFound());
     }
     catch (Exception)
     {
         return(InternalServerError());
     }
 }