简陋的检查还是有必要的(

This commit is contained in:
shenjack 2024-05-09 00:04:31 +08:00
parent ad686526eb
commit fea4142c9e
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -92,7 +92,7 @@ async function win_rate(names: string, round: number): Promise<WinRateResult> {
throw new Error("round 必须大于 0");
}
if (!test_check(names)) {
throw new Error("你怎么在胜率输入里 !test!(恼)\n${names}");
throw new Error("你怎么在胜率输入里丢了 !test!(恼)\n${names}");
}
return await md5_module.win_rate(names, round);
}
@ -108,7 +108,7 @@ async function win_rate_callback(
callback: WinRateCallback,
): Promise<WinRateResult> {
if (!test_check(names)) {
throw new Error("你怎么在胜率输入里 !test!(恼)\n${names}");
throw new Error("你怎么在胜率输入里丢了 !test!(恼)\n${names}");
}
return await md5_module.win_rate_callback(names, callback);
}
@ -119,7 +119,7 @@ async function score(names: string, round: number): Promise<ScoreResult> {
throw new Error("round 必须大于 0");
}
if (!test_check(names)) {
throw new Error("你怎么在分数输入里 !test!(恼)\n${names}");
throw new Error("你怎么在分数输入里丢了 !test!(恼)\n${names}");
}
return await md5_module.score(names, round);
}