@@ -84,18 +84,22 @@ leetcodeClient.getProblems = function(cb) {
8484 if ( json . user_name . length === 0 )
8585 return cb ( 'session expired, please login again' ) ;
8686
87- var problems = json . stat_status_pairs . map ( function ( p ) {
88- return {
89- state : p . status || 'None' ,
90- id : p . stat . question_id ,
91- name : p . stat . question__title ,
92- key : p . stat . question__title_slug ,
93- link : config . PROBLEM_URL . replace ( '$id' , p . stat . question__title_slug ) ,
94- locked : p . paid_only ,
95- percent : p . stat . total_acs * 100 / p . stat . total_submitted ,
96- level : h . levelToName ( p . difficulty . level )
97- } ;
98- } ) ;
87+ var problems = json . stat_status_pairs
88+ . filter ( function ( p ) {
89+ return ! p . stat . question__hide ;
90+ } )
91+ . map ( function ( p ) {
92+ return {
93+ state : p . status || 'None' ,
94+ id : p . stat . question_id ,
95+ name : p . stat . question__title ,
96+ key : p . stat . question__title_slug ,
97+ link : config . PROBLEM_URL . replace ( '$id' , p . stat . question__title_slug ) ,
98+ locked : p . paid_only ,
99+ percent : p . stat . total_acs * 100 / p . stat . total_submitted ,
100+ level : h . levelToName ( p . difficulty . level )
101+ } ;
102+ } ) ;
99103
100104 return cb ( null , problems ) ;
101105 } ) ;
0 commit comments