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

                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));
            }
        }