Exemplo n.º 1
0
        public async Task <IActionResult> CanOpen([FromBody] CanOpenSubTaskModel model)
        {
            var canOpenTaskHead = await _userTaskHeadService.CanOpen(model.UserId, model.UserTaskHeadId);

            return(Ok(canOpenTaskHead));

            if (canOpenTaskHead)
            {
                var canOpenSubTask = await _userSubTaskService.CanOpen(model.UserId, model.UserTaskHeadId, model.UserSubTaskId);

                return(Ok(canOpenSubTask));
            }

            return(Ok(false));
        }
Exemplo n.º 2
0
 public async Task <IActionResult> CanOpen([FromBody] CanOpenTaskHeadModel model)
 {
     return(Ok(await _taskHeadService.CanOpen(model.UserId, model.UserTaskHeadId)));
 }