public async Task <ActionResult> Update([FromBody] MeUpdateRequest updateRequest) { var result = await userUpdater.Handle(new UpdateUserParams(User !, updateRequest.Email)); return(result.Match <ActionResult>( fail => BadRequest(fail), Ok )); }
public async Task <IActionResult> Update([FromBody] MeUpdateRequest updateRequest) => (await mediator.Command(new UserUpdateCommand(User !.Username, new UserUpdate(updateRequest.Email), User !)))