@@ -57,7 +57,6 @@ class LeetCode extends ChainNodeBase {
57
57
getCategoryProblems = ( category , cb ) => {
58
58
const opts = makeOpts ( configUtils . sys . urls . problems . replace ( "$category" , category ) ) ;
59
59
60
- let that = this ;
61
60
request ( opts , function ( e , resp , body ) {
62
61
e = checkError ( e , resp , 200 ) ;
63
62
if ( e ) return cb ( e ) ;
@@ -121,7 +120,6 @@ server to get the problem's description, test cases, and other information. */
121
120
operationName : "getQuestionDetail" ,
122
121
} ;
123
122
124
- let that = this ;
125
123
request . post ( opts , function ( e , resp , body ) {
126
124
e = checkError ( e , resp , 200 ) ;
127
125
if ( e ) return cb ( e ) ;
@@ -293,7 +291,7 @@ server to get the problem's description, test cases, and other information. */
293
291
getSubmissions = ( problem , cb ) => {
294
292
const opts = makeOpts ( configUtils . sys . urls . submissions . replace ( "$slug" , problem . slug ) ) ;
295
293
opts . headers . Referer = configUtils . sys . urls . problem . replace ( "$slug" , problem . slug ) ;
296
- let that = this ;
294
+
297
295
request ( opts , function ( e , resp , body ) {
298
296
e = checkError ( e , resp , 200 ) ;
299
297
if ( e ) return cb ( e ) ;
@@ -310,7 +308,7 @@ server to get the problem's description, test cases, and other information. */
310
308
/* Getting the submission code and the runtime distribution chart. */
311
309
getSubmission = ( submission , cb ) => {
312
310
const opts = makeOpts ( configUtils . sys . urls . submission . replace ( "$id" , submission . id ) ) ;
313
- let that = this ;
311
+
314
312
request ( opts , function ( e , resp , body ) {
315
313
e = checkError ( e , resp , 200 ) ;
316
314
if ( e ) return cb ( e ) ;
@@ -339,7 +337,6 @@ server to get the problem's description, test cases, and other information. */
339
337
operationName : operationName ,
340
338
} ;
341
339
342
- let that = this ;
343
340
// eslint-disable-next-line @typescript-eslint/no-unused-vars
344
341
request . post ( opts , function ( e : any , resp : any , _ ) {
345
342
e = checkError ( e , resp , 200 ) ;
@@ -352,7 +349,6 @@ server to get the problem's description, test cases, and other information. */
352
349
getFavorites = ( cb : any ) => {
353
350
const opts = makeOpts ( configUtils . sys . urls . favorites ) ;
354
351
355
- let that = this ;
356
352
request ( opts , function ( e , resp , body ) {
357
353
e = checkError ( e , resp , 200 ) ;
358
354
if ( e ) return cb ( e ) ;
@@ -364,7 +360,6 @@ server to get the problem's description, test cases, and other information. */
364
360
365
361
/* Making a POST request to the GraphQL API. */
366
362
getUserInfo = ( cb : any ) => {
367
- let that = this ;
368
363
const opts = makeOpts ( configUtils . sys . urls . graphql ) ;
369
364
opts . headers . Origin = configUtils . sys . urls . base ;
370
365
opts . headers . Referer = configUtils . sys . urls . base ;
@@ -390,7 +385,6 @@ server to get the problem's description, test cases, and other information. */
390
385
opts . method = method ;
391
386
opts . body = data ;
392
387
393
- let that = this ;
394
388
request ( opts , function ( e , resp , body ) {
395
389
e = checkError ( e , resp , 200 ) ;
396
390
if ( e && e . statusCode === 302 ) e = sessionUtils . errors . EXPIRED ;
@@ -423,7 +417,6 @@ page and gets the csrf token. It then makes a post request to the login page wit
423
417
the user's login and password. If the response status code is 302, it saves the user's session id
424
418
and csrf token to the user object and saves the user object to the session. */
425
419
signin = ( user : any , cb : any ) => {
426
- let that = this ;
427
420
// eslint-disable-next-line @typescript-eslint/no-unused-vars
428
421
request ( configUtils . sys . urls . login , function ( e : any , resp : any , _ ) {
429
422
e = checkError ( e , resp , 200 ) ;
0 commit comments