モデレーターを凍結できないようにする (#3877)
This commit is contained in:
parent
1b065d4969
commit
b68407b9e0
1 changed files with 4 additions and 0 deletions
|
@ -37,6 +37,10 @@ export default define(meta, (ps) => new Promise(async (res, rej) => {
|
|||
return rej('cannot suspend admin');
|
||||
}
|
||||
|
||||
if (user.isModerator) {
|
||||
return rej('cannot suspend moderator');
|
||||
}
|
||||
|
||||
await User.findOneAndUpdate({
|
||||
_id: user._id
|
||||
}, {
|
||||
|
|
Loading…
Reference in a new issue