Skip to content

Commit 1a10a81

Browse files
author
C4Phone
committed
allow paid user to show locked problems
1 parent d882503 commit 1a10a81

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/leetcode_client.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,11 @@ var aceCtrl = {
116116
};
117117

118118
leetcodeClient.getProblem = function(problem, cb) {
119-
request(problem.link, function(e, resp, body) {
119+
var opts = makeOpts();
120+
opts.url = problem.link;
121+
request(opts, function(e, resp, body) {
120122
e = checkError(e, resp, 200);
123+
// FIXME: if session expired, this will still return 200
121124
if (e) return cb(e);
122125

123126
var $ = cheerio.load(body);

0 commit comments

Comments
 (0)