Пример #1
0
        public async Task <IActionResult> GetUserSettingsByUserIdAsync([FromQuery] string userId)
        {
            if (string.IsNullOrEmpty(userId))
            {
                return(StatusCode(StatusCodes.Status400BadRequest, "Invalid user id"));
            }

            try
            {
                return(Ok(await _userSettingService.GetUserSettingsByUserIdAsync(userId).ConfigureAwait(false)));
            }
            catch (Exception ex)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message));
            }
        }