File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 31
31
"lint:js" : " ./node_modules/.bin/eslint --ext .js,.jsx ." ,
32
32
"test" : " npm run lint && npm run jest"
33
33
},
34
- "version" : " 1.0.2 " ,
34
+ "version" : " 1.0.3 " ,
35
35
"dependencies" : {
36
36
"auth0-js" : " ^6.8.4" ,
37
37
"config" : " ^3.2.0" ,
Original file line number Diff line number Diff line change @@ -522,10 +522,12 @@ class ChallengesService {
522
522
/**
523
523
* Gets user resources.
524
524
* @param {String } userId User id whose challenges we want to fetch.
525
+ * @param {Number } page Current page for paginated API response (default 1)
526
+ * @param {Number } perPage Page size for paginated API response (default 1000)
525
527
* @return {Promise } Resolves to the api response.
526
528
*/
527
- async getUserResources ( userId ) {
528
- const res = await this . private . apiV5 . get ( `/resources/${ userId } /challenges` ) ;
529
+ async getUserResources ( userId , page = 1 , perPage = 1000 ) {
530
+ const res = await this . private . apiV5 . get ( `/resources/${ userId } /challenges?page= ${ page } &perPage= ${ perPage } ` ) ;
529
531
return res . json ( ) ;
530
532
}
531
533
You can’t perform that action at this time.
0 commit comments