public async Task <IActionResult> AddUserSettingAsync([FromBody] UserSettingModel userSetting) { try { if (!ModelState.IsValid) { return(StatusCode(StatusCodes.Status400BadRequest, ModelState.ToString())); } userSetting.UserId = HttpContext.User.Identity.Name; return(Ok(await _userSettingService.AddUserSettingAsync(userSetting).ConfigureAwait(false))); } catch (Exception ex) { return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message)); } }