✨ feat(db): 修改role表数据库操作方式
This commit is contained in:
@@ -2,7 +2,7 @@ import { STATUS } from '@consts';
|
||||
import { ServerlistModel } from '@db/Serverlist';
|
||||
import { nowSeconds } from 'app/pubUtils/timeUtil';
|
||||
import { checkWhiteList } from 'app/pubUtils/sysUtil';
|
||||
import { RoleModel } from '@db/Role';
|
||||
import Role from '@db/Role';
|
||||
|
||||
module.exports = () => {
|
||||
return async function checkMainten(ctx, next) {
|
||||
@@ -16,7 +16,7 @@ module.exports = () => {
|
||||
} else {
|
||||
const versionFlag = ctx.service.utils.compareVersion(version, server.maintenance.version||'0.0.0');
|
||||
if(versionFlag >= 0) { // 新版本号
|
||||
let hasRole = await RoleModel.checkHasRole(ctx.uid, server.latestServerUniqId); // 是否是老玩家
|
||||
let hasRole = await Role.checkHasRole(ctx.uid, server.latestServerUniqId); // 是否是老玩家
|
||||
if(!hasRole) {
|
||||
return await next();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user