From bae4073a64f52882cdf05df79b9b214f6c5c962d Mon Sep 17 00:00:00 2001 From: whyour Date: Thu, 27 Feb 2025 23:57:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=87=8D=E7=BD=AE=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/api/system.ts | 1 + back/services/user.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/back/api/system.ts b/back/api/system.ts index 01f39818..7336d068 100644 --- a/back/api/system.ts +++ b/back/api/system.ts @@ -384,6 +384,7 @@ export default (app: Router) => { body: Joi.object({ retries: Joi.number().optional(), twoFactorActivated: Joi.boolean().optional(), + password: Joi.string().optional(), }), }), async (req: Request, res: Response, next: NextFunction) => { diff --git a/back/services/user.ts b/back/services/user.ts index 22a9edff..a2cb0ef7 100644 --- a/back/services/user.ts +++ b/back/services/user.ts @@ -347,11 +347,12 @@ export default class UserService { } public async resetAuthInfo(info: Partial) { - const { retries, twoFactorActivated } = info; + const { retries, twoFactorActivated, password } = info; const authInfo = await this.getAuthInfo(); await this.updateAuthInfo(authInfo, { retries, twoFactorActivated, + password, }); } }