Skip to content

Commit 286bce2

Browse files
committed
Update of challenges service to leverage another API problem
unexpected format of submission objects from v3 API for past challenges
1 parent 1aa3e48 commit 286bce2

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"lint:js": "./node_modules/.bin/eslint --ext .js,.jsx .",
2929
"test": "npm run lint && npm run jest"
3030
},
31-
"version": "0.0.8",
31+
"version": "0.0.9",
3232
"dependencies": {
3333
"isomorphic-fetch": "^2.2.1",
3434
"le_node": "^1.7.0",

src/services/challenges.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ export function normalizeChallengeDetails(v3, v3Filtered, v3User, username) {
189189
/* Taking winners from v3_filtered, because winners are returned empty in v3 */
190190
/* TODO: Enforced due to problems with /v3/challenge/{ID} endpoint */
191191
challenge.winners = v3Filtered.winners || [];
192+
/* TODO: To compenstate the difference in structure of `submissions`
193+
* in v3 and v3Filetered results (existing code needs v3Filtered version).
194+
*/
195+
challenge.submissions = v3Filtered.submissions || [];
192196
}
193197

194198
// Fill missing data from v3_user

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy