public virtual async Task <JsonResult> ChangeUserPassword(ChangeUserPasswordViewModel input) { if (input.NewPassword != input.NewPasswordAgain) { throw new UserFriendlyException("`new password` should be same with `new password again`"); } await _userAppService.ChangePasswordAsync(new ChangePasswordDto { CurrentPassword = input.CurrentPassword, NewPassword = input.NewPassword }); return(Json(new AjaxResponse())); }
public async Task <ResultObject> ChangePasswordAsync([FromBody] PasswordDto passwordDto) { return(await userAppService.ChangePasswordAsync(passwordDto)); }