Skip to content

Commit 41dfa29

Browse files
committed
Fix minor typo in suspect verification
1 parent f6661b4 commit 41dfa29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/actions.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const redundantFetch = async (targetUrl: string, data: RequestInit, attempts = 0
7171
}
7272
};
7373

74-
const smogonFetch = async (targetUrl: string, method: string, data: {[k: string]: any}) => {
74+
export const smogonFetch = async (targetUrl: string, method: string, data: {[k: string]: any}) => {
7575
const bodyText = JSON.stringify(data);
7676
const hash = await signAsync("RSA-SHA1", bodyText, Config.privatekey);
7777
return redundantFetch(`https://www.smogon.com/${targetUrl}`, {
@@ -80,7 +80,7 @@ const smogonFetch = async (targetUrl: string, method: string, data: {[k: string]
8080
});
8181
};
8282

83-
function checkSuspectVerified(
83+
export function checkSuspectVerified(
8484
rating: LadderEntry,
8585
suspect: {formatid: string, start_date: number},
8686
reqs: Record<string, number | null>
@@ -110,7 +110,7 @@ function checkSuspectVerified(
110110
}
111111
if (
112112
// sanity check for reqs existing just to be totally safe
113-
(reqsMet >= 1 && reqsMet === reqCount) &&
113+
(reqsMet > 0 && reqsMet === reqCount) &&
114114
// did not play games before the test began
115115
(rating?.first_played && rating.first_played > suspect.start_date)
116116
) {

0 commit comments

Comments
 (0)