Esempio n. 1
0
        public async Task <IActionResult> UpdatePassword(UpdatePasswordViewModel viewModel)
        {
            // Change a specific Employee account's password
            var result = await _mediator.Send(new UpdatePassword.Command(viewModel));

            if (!result)
            {
                return(BadRequest(new ErrorHandler {
                    Description = "Unable to update password."
                }));
            }

            return(Ok());
        }
 public Command(UpdatePasswordViewModel viewModel)
 {
     ViewModel = viewModel;
 }