mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: allow banReason option
This commit is contained in:
1 parent
5c3e2d8571
commit
be0423fe93
4 files changed
+5
-5
No files matched your search
@@ -400,9 +400,9 @@ class UserModel {
|
||||
}
|
||||
|
||||
@ArgMethod
|
||||
static ban(uid: number) {
|
||||
static ban(uid: number, reason = '') {
|
||||
return Promise.all([
|
||||
UserModel.setPriv(uid, PRIV.PRIV_NONE),
|
||||
UserModel.setById(uid, { priv: PRIV.PRIV_NONE, banReason: reason }),
|
||||
token.delByUid(uid),
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user