后台:修改服务器状态

This commit is contained in:
luying
2021-12-08 11:58:56 +08:00
parent aec83c1481
commit b51a2839da
9 changed files with 52 additions and 14 deletions
+3 -3
View File
@@ -291,10 +291,10 @@ 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) {
if(role.blockType == BLOCK_TYPE.BLOCK) {
return ctx.service.utils.resResult(STATUS.BLOCKED);
}
return ctx.service.utils.resResult(STATUS.SUCCESS, { roleId: role.roleId });
}
return ctx.service.utils.resResult(STATUS.ROLE_NOT_FOUND);