public async Task <IActionResult> PatchUser(string subjectId, [FromBody] PatchUserInputModel model) { var patch = model?.ToPatchUserModel(subjectId); var response = await _userOrchestrator.PatchUserAsync(patch); if (response.Content is Models.User) { response.Content = (response.Content as Models.User)?.ToGetUserViewModel(); } return(response.ToJsonResult()); }
public async Task <IActionResult> PatchUser([FromBody] PatchUserInputModel model) { var subjectId = User.GetSubjectId(); var patch = model?.ToPatchUserModel(); var response = await _userOrchestrator.PatchUserAsync(patch); if (response.HasError) { return(response.ToJsonResult()); } var vmResponse = StandardResponse.Response.Success <GetUserViewModel, WebStatus>(response.Result.ToGetUserViewModel()); return(vmResponse.ToJsonResult()); }