core: allow banReason option

This commit is contained in:
undefined committed 2022-12-22 22:49:31 +08:00
1 parent 5c3e2d8571
commit be0423fe93
4 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -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),
]);
}