@@ -28,15 +28,15 @@ leetcodeClient.getProblems = function(cb) {
28
28
var problems = [ ] ;
29
29
problemsListJson . stat_status_pairs . forEach ( function ( problemData ) {
30
30
var problem = {
31
- state : problemData [ ' status' ] ,
32
- id : problemData [ ' stat' ] [ ' question_id' ] . toString ( ) ,
33
- name : problemData [ ' stat' ] [ ' question__title' ] ,
34
- key : problemData [ ' stat' ] [ ' question__title_slug' ] ,
35
- link : config . PROBLEM_URL + problemData [ ' stat' ] [ ' question__title_slug' ] ,
36
- locked : problemData [ ' paid_only' ] ,
37
- level : parseDifficulty ( problemData [ ' difficulty' ] [ ' level' ] )
31
+ state : problemData . status ,
32
+ id : problemData . stat . question_id . toString ( ) ,
33
+ name : problemData . stat . question__title ,
34
+ key : problemData . stat . question__title_slug ,
35
+ link : config . PROBLEM_URL + problemData . stat . question__title_slug ,
36
+ locked : problemData . paid_only ,
37
+ level : parseDifficulty ( problemData . difficulty . level )
38
38
} ;
39
- var percent = parseInt ( problemData [ ' stat' ] [ ' total_acs' ] , 10 ) / parseInt ( problemData [ ' stat' ] [ ' total_submitted' ] , 10 ) * 100 ;
39
+ var percent = parseInt ( problemData . stat . total_acs , 10 ) / parseInt ( problemData . stat . total_submitted , 10 ) * 100 ;
40
40
problem . percent = percent . toFixed ( 1 ) . toString ( ) + '%' ;
41
41
problems . push ( problem ) ;
42
42
} ) ;
0 commit comments