🎈 perf(热更新): 添加白名单热更新地址
This commit is contained in:
@@ -11,13 +11,13 @@ const privateKey = fs.readFileSync(path.resolve(__dirname, `../resource/privateK
|
||||
const publicKey = fs.readFileSync(path.resolve(__dirname, `../resource/publicKey`)); // 发推送加密的秘钥,和privateKey不是一对
|
||||
|
||||
|
||||
export async function checkWhiteList(env: string, ip: string, uid: number, serverId: number) {
|
||||
export async function checkWhiteList(env: string, ip: string, uid: number) {
|
||||
if(ip) {
|
||||
let result = await WhiteListModel.checkIp(env, ip);
|
||||
if(!!result) return true;
|
||||
}
|
||||
if(uid && serverId) {
|
||||
let result = await WhiteListModel.checkUid(env, serverId, uid);
|
||||
if(uid) {
|
||||
let result = await WhiteListModel.checkUid(env, uid);
|
||||
if(!!result) return true;
|
||||
}
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user