后台:角色封禁
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
import { COUNTER, DEFAULT_LV, ADULT_AGE, GUEST_MAX_TIME, TASK_TYPE } from '@consts';
|
||||
import { COUNTER, DEFAULT_LV, ADULT_AGE, GUEST_MAX_TIME, TASK_TYPE, BLOCK_TYPE } from '@consts';
|
||||
import { RoleModel } from '@db/Role';
|
||||
import { UserModel, UserType } from '@db/User';
|
||||
import { STATUS, GET_SMS_TYPE, ADDICTION_PREVENTION_CODE } from '@consts';
|
||||
@@ -291,6 +291,9 @@ export default class Auth extends Service {
|
||||
const ctx = this.ctx;
|
||||
const { uid } = ctx;
|
||||
const role = await RoleModel.findByUid(uid, serverId);
|
||||
if(role.blockType == BLOCK_TYPE.BLOCK) {
|
||||
return ctx.service.utils.resResult(STATUS.BLOCKED);
|
||||
}
|
||||
if (role) {
|
||||
return ctx.service.utils.resResult(STATUS.SUCCESS, { roleId: role.roleId });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user