Example #1
0
        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
                       ));
        }
Example #2
0
 public async Task <IActionResult> Update([FromBody] MeUpdateRequest updateRequest) =>
 (await mediator.Command(new UserUpdateCommand(User !.Username, new UserUpdate(updateRequest.Email), User !)))