Skip to content

Commit f02ed92

Browse files
hongyu zhouhongyu zhou
authored andcommitted
Load all related user challenges
1 parent ef6b9d9 commit f02ed92

File tree

4 files changed

+134
-66
lines changed

4 files changed

+134
-66
lines changed

__tests__/__snapshots__/index.js.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,14 +426,17 @@ Object {
426426
"countReset": [Function],
427427
"debug": [Function],
428428
"dir": [Function],
429+
"dirxml": [Function],
429430
"error": [Function],
430431
"group": [Function],
431432
"groupCollapsed": [Function],
432433
"groupEnd": [Function],
433434
"info": [Function],
434435
"log": [Function],
436+
"table": [Function],
435437
"time": [Function],
436438
"timeEnd": [Function],
439+
"timeLog": [Function],
437440
"trace": [Function],
438441
"warn": [Function],
439442
},

dist/dev/index.js

Lines changed: 128 additions & 56 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/prod/index.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/actions/challenge-listing.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,9 @@ function getActiveChallengesDone(
195195
user = decodeToken(tokenV3).handle;
196196
// Handle any errors on this endpoint so that the non-user specific challenges
197197
// will still be loaded.
198-
calls.push(service.getUserChallenges(user, filter, {
199-
limit: PAGE_SIZE,
200-
offset: page * PAGE_SIZE,
201-
}).catch(() => ({ challenges: [] })));
198+
calls.push(getAll(
199+
params => service.getUserChallenges(user, filter, params).catch(() => ({ challenges: [] })),
200+
));
202201
}
203202
return Promise.all(calls).then(([ch, uch]) => {
204203
// let fullCH = ch;

0 commit comments

Comments
 (0)