public IActionResult ChangePassword([FromBody] string newPassword)
        {
            var userId = Request.GetUserId();

            _userAccountFacade.ChangePassword(userId, newPassword);
            return(Ok());
        }
Esempio n. 2
0
        public JsonResult ChangePassword(string oldPassword, string newPassword)
        {
            // 获取当前用户
            var contextService = AppContext.Current.Resolve <IContextService>();

            _accountFacade.ChangePassword(contextService.CurrentAccount.AccountId, oldPassword, newPassword);
            return(Json(new { success = true }));
        }
Esempio n. 3
0
        public ChangeUserPasswordResponse ChangePassword([FromBody] ChangeUserPasswordRequest request)
        {
            ChangeUserPasswordResponse response = _accountFacade.ChangePassword(request);

            return(response);
        }