public async Task <BaseResponse> EditAsync(EditLoggedUserRequest request) { var loggedUser = await GetLoggedUserAsync(); loggedUser.User.Email = request.Email; loggedUser.User.Locale = request.Locale; loggedUser.User.FullName = request.FullName; _userRepository.Update(loggedUser.User); await _unitOfWork.SaveChangesAsync(); return(new BaseResponse()); }
public async Task <IActionResult> EditDetails([FromBody] EditLoggedUserRequest request) { if (!ModelState.IsValid) { return(BadRequest(ModelState.GetErrorMessages())); } var response = await _authenticationService.EditAsync(request); if (!response.IsValid) { return(BadRequest(response.Message)); } return(Ok(response)); }