File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -517,6 +517,16 @@ class ChallengesService {
517
517
} ;
518
518
}
519
519
520
+ /**
521
+ * Gets user resources.
522
+ * @param {String } userId User id whose challenges we want to fetch.
523
+ * @return {Promise } Resolves to the api response.
524
+ */
525
+ async getUserResources ( userId ) {
526
+ const res = await this . private . apiV5 . get ( `/resources/${ userId } /challenges` ) ;
527
+ return res . json ( ) ;
528
+ }
529
+
520
530
/**
521
531
* Gets marathon matches of the specified user.
522
532
* @param {String } memberId User whose challenges we want to fetch.
Original file line number Diff line number Diff line change @@ -173,8 +173,8 @@ function filterByUpcoming(challenge, state) {
173
173
}
174
174
175
175
function filterByUsers ( challenge , state ) {
176
- if ( ! state . users ) return true ;
177
- return state . users . find ( user => challenge . users [ user ] ) ;
176
+ if ( ! state . userChallenges ) return true ;
177
+ return state . userChallenges . find ( ch => challenge . id === ch ) ;
178
178
}
179
179
180
180
/**
You can’t perform that action at this time.
0 commit comments