コード例 #1
0
        public async Task <IActionResult> Get()
        {
            try
            {
                var result = await _userTaskService.GetAllUserTasksForLoggedInUser();

                if (result.Success)
                {
                    return(StatusCode(StatusCodes.Status200OK, result.Data));
                }

                return(StatusCode(StatusCodes.Status400BadRequest, result.Message));
            }
            catch (Exception ex)
            {
                _logger.LogError(ex.Message);
                return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message));
            }
        }