检查密码默认值

This commit is contained in:
whyour committed 2021-10-19 21:46:24 +08:00
1 parent c42299766c
commit 6315425a7b
3 files changed
+18 -3

No files matched your search

+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: '更新成功' };