🎈 perf(热更新): 添加白名单热更新地址

This commit is contained in:
luying
2022-11-23 11:38:22 +08:00
parent 6981b4c3e3
commit f1c6a658da
11 changed files with 33 additions and 209 deletions

View File

@@ -282,7 +282,7 @@ class Filter {
if(!mainten) return false // 该服务器维护
if(mainten.startTime > nowSeconds() || mainten.endTime < nowSeconds()) return false;
let isWhiteList = await checkWhiteList(this.app.get('env'), ip, uid, serverId);
let isWhiteList = await checkWhiteList(this.app.get('env'), ip, uid);
if(isWhiteList) return false;
return true

View File

@@ -308,7 +308,7 @@ export async function getIpLocation(ip: string) {
// 服务器是否开启
export async function checkServerIsOpen(serverId: number, ip: string, uid: number) {
let isWhiteList = await checkWhiteList(pinus.app.get('env'), ip, uid, serverId);
let isWhiteList = await checkWhiteList(pinus.app.get('env'), ip, uid);
if(isWhiteList) return true;
let serverTime = await getServerCreateTime(serverId);