Skip to content

Commit 2059f61

Browse files
committed
update
1 parent 89cdf84 commit 2059f61

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/rpc/actionChain/chainNode/leetcode.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class LeetCode extends ChainNodeBase {
5757
getCategoryProblems = (category, cb) => {
5858
const opts = makeOpts(configUtils.sys.urls.problems.replace("$category", category));
5959

60-
let that = this;
6160
request(opts, function (e, resp, body) {
6261
e = checkError(e, resp, 200);
6362
if (e) return cb(e);
@@ -121,7 +120,6 @@ server to get the problem's description, test cases, and other information. */
121120
operationName: "getQuestionDetail",
122121
};
123122

124-
let that = this;
125123
request.post(opts, function (e, resp, body) {
126124
e = checkError(e, resp, 200);
127125
if (e) return cb(e);
@@ -293,7 +291,7 @@ server to get the problem's description, test cases, and other information. */
293291
getSubmissions = (problem, cb) => {
294292
const opts = makeOpts(configUtils.sys.urls.submissions.replace("$slug", problem.slug));
295293
opts.headers.Referer = configUtils.sys.urls.problem.replace("$slug", problem.slug);
296-
let that = this;
294+
297295
request(opts, function (e, resp, body) {
298296
e = checkError(e, resp, 200);
299297
if (e) return cb(e);
@@ -310,7 +308,7 @@ server to get the problem's description, test cases, and other information. */
310308
/* Getting the submission code and the runtime distribution chart. */
311309
getSubmission = (submission, cb) => {
312310
const opts = makeOpts(configUtils.sys.urls.submission.replace("$id", submission.id));
313-
let that = this;
311+
314312
request(opts, function (e, resp, body) {
315313
e = checkError(e, resp, 200);
316314
if (e) return cb(e);
@@ -339,7 +337,6 @@ server to get the problem's description, test cases, and other information. */
339337
operationName: operationName,
340338
};
341339

342-
let that = this;
343340
// eslint-disable-next-line @typescript-eslint/no-unused-vars
344341
request.post(opts, function (e: any, resp: any, _) {
345342
e = checkError(e, resp, 200);
@@ -352,7 +349,6 @@ server to get the problem's description, test cases, and other information. */
352349
getFavorites = (cb: any) => {
353350
const opts = makeOpts(configUtils.sys.urls.favorites);
354351

355-
let that = this;
356352
request(opts, function (e, resp, body) {
357353
e = checkError(e, resp, 200);
358354
if (e) return cb(e);
@@ -364,7 +360,6 @@ server to get the problem's description, test cases, and other information. */
364360

365361
/* Making a POST request to the GraphQL API. */
366362
getUserInfo = (cb: any) => {
367-
let that = this;
368363
const opts = makeOpts(configUtils.sys.urls.graphql);
369364
opts.headers.Origin = configUtils.sys.urls.base;
370365
opts.headers.Referer = configUtils.sys.urls.base;
@@ -390,7 +385,6 @@ server to get the problem's description, test cases, and other information. */
390385
opts.method = method;
391386
opts.body = data;
392387

393-
let that = this;
394388
request(opts, function (e, resp, body) {
395389
e = checkError(e, resp, 200);
396390
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
423417
the user's login and password. If the response status code is 302, it saves the user's session id
424418
and csrf token to the user object and saves the user object to the session. */
425419
signin = (user: any, cb: any) => {
426-
let that = this;
427420
// eslint-disable-next-line @typescript-eslint/no-unused-vars
428421
request(configUtils.sys.urls.login, function (e: any, resp: any, _) {
429422
e = checkError(e, resp, 200);

0 commit comments

Comments
 (0)