检查密码默认值

This commit is contained in:
whyour
2021-10-19 21:46:24 +08:00
parent c42299766c
commit 6315425a7b
3 changed files with 18 additions and 3 deletions
+3
View File
@@ -228,6 +228,9 @@ export default class UserService {
username: string;
password: string;
}) {
if (password === 'admin') {
return { code: 400, message: '密码不能设置为admin' };
}
const authInfo = this.getAuthInfo();
this.updateAuthInfo(authInfo, { username, password });
return { code: 200, message: '更新成功' };