File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,11 @@ export class Generator {
4747 return result ;
4848 }
4949
50- protected async fetch ( username : string , site : "us" | "cn" ) : Promise < FetchedData > {
50+ protected async fetch (
51+ username : string ,
52+ site : "us" | "cn" ,
53+ headers : Record < string , string > ,
54+ ) : Promise < FetchedData > {
5155 this . log ( "fetching" , username , site ) ;
5256 const cache_key = `data-${ username . toLowerCase ( ) } -${ site } ` ;
5357
@@ -61,11 +65,11 @@ export class Generator {
6165
6266 try {
6367 if ( site === "us" ) {
64- const data = await query . us ( username ) ;
68+ const data = await query . us ( username , headers ) ;
6569 this . cache . put ( cache_key , data ) . catch ( console . error ) ;
6670 return data ;
6771 } else {
68- const data = await query . cn ( username ) ;
72+ const data = await query . cn ( username , headers ) ;
6973 this . cache . put ( cache_key , data ) . catch ( console . error ) ;
7074 return data ;
7175 }
You can’t perform that action at this time.
0 commit comments