服务器:修复白名单bug

This commit is contained in:
luying
2022-01-10 18:13:27 +08:00
parent 002ca4f8db
commit 5641d8fdfa
8 changed files with 34 additions and 24 deletions

View File

@@ -11,14 +11,14 @@ module.exports = () => {
if (server && server.maintenance && server.maintenance.isOpen && server.maintenance.startTime < nowSeconds() && server.maintenance.endTime > nowSeconds()) {
let isWhiteList = await checkWhiteList(ctx.app.config.realEnv, ctx.clientIp, ctx.uid, serverId);
if (isWhiteList) {
await next();
return await next();
} else {
ctx.body = ctx.service.utils.resResult(STATUS.SERVER_MAINTENANCE);
return;
}
}
}
await next();
return await next();
};
};