@@ -71,7 +71,7 @@ const redundantFetch = async (targetUrl: string, data: RequestInit, attempts = 0
71
71
}
72
72
} ;
73
73
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 } ) => {
75
75
const bodyText = JSON . stringify ( data ) ;
76
76
const hash = await signAsync ( "RSA-SHA1" , bodyText , Config . privatekey ) ;
77
77
return redundantFetch ( `https://www.smogon.com/${ targetUrl } ` , {
@@ -80,7 +80,7 @@ const smogonFetch = async (targetUrl: string, method: string, data: {[k: string]
80
80
} ) ;
81
81
} ;
82
82
83
- function checkSuspectVerified (
83
+ export function checkSuspectVerified (
84
84
rating : LadderEntry ,
85
85
suspect : { formatid : string , start_date : number } ,
86
86
reqs : Record < string , number | null >
@@ -110,7 +110,7 @@ function checkSuspectVerified(
110
110
}
111
111
if (
112
112
// sanity check for reqs existing just to be totally safe
113
- ( reqsMet >= 1 && reqsMet === reqCount ) &&
113
+ ( reqsMet > 0 && reqsMet === reqCount ) &&
114
114
// did not play games before the test began
115
115
( rating ?. first_played && rating . first_played > suspect . start_date )
116
116
) {
0 commit comments