pref: 优化重置管理员密码后打印出用户名,避免忘记用户名的情况

v2
xiaojunnuo 2025-01-16 11:49:09 +08:00
parent 709105120c
commit 8cbab7525a
1 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,8 @@ export class ResetPasswdMiddleware implements IWebMiddleware {
const newPasswd = '123456';
await this.userService.resetPassword(1, newPasswd);
await this.userService.updateStatus(1, 1);
logger.info(`重置1号管理员用户的密码完成新密码为${newPasswd}`);
const user = await this.userService.info(1);
logger.info(`重置1号管理员用户的密码完成用户名${user.username},新密码:${newPasswd}`);
}
}
}