示例#1
0
        public async Task <IActionResult> GetWithDateFilter([FromBody] GetByDateDto getByDateDto)
        {
            try
            {
                var result = await _userTaskService.GetByDate(getByDateDto);

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