军团活动:参数校验
This commit is contained in:
@@ -1005,7 +1005,7 @@ export function checkRouteParam(route: string, msg: any) {
|
|||||||
let { code, round, record } = msg;
|
let { code, round, record } = msg;
|
||||||
if(!checkNaturalStrings(code)) return false;
|
if(!checkNaturalStrings(code)) return false;
|
||||||
if(!checkNaturalNumbers(round)) return false;
|
if(!checkNaturalNumbers(round)) return false;
|
||||||
if(!checkNaturalArray(record)) return false;
|
if(!checkArrayCanEmpty(record)) return false;
|
||||||
for(let { round, dataId } of record) {
|
for(let { round, dataId } of record) {
|
||||||
if(!checkNaturalNumbers(round, dataId)) return false;
|
if(!checkNaturalNumbers(round, dataId)) return false;
|
||||||
}
|
}
|
||||||
@@ -1013,9 +1013,8 @@ export function checkRouteParam(route: string, msg: any) {
|
|||||||
}
|
}
|
||||||
case "guild.gateActivityHandler.battleEnd":
|
case "guild.gateActivityHandler.battleEnd":
|
||||||
{
|
{
|
||||||
let { code, isSuccess, gateHp } = msg;
|
let { code, isSuccess } = msg;
|
||||||
if(!checkNaturalStrings(code)) return false;
|
if(!checkNaturalStrings(code)) return false;
|
||||||
if(!checkNaturalNumbers(gateHp)) return false;
|
|
||||||
if(!checkBoolean(isSuccess)) return false;
|
if(!checkBoolean(isSuccess)) return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user