Skip to content

I v5 develop 18 aug #225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@
"lint:js": "./node_modules/.bin/eslint --ext .js,.jsx .",
"test": "npm run lint && npm run jest"
},
"version": "1000.19.45",
"version": "1000.19.48",
"dependencies": {
"auth0-js": "^6.8.4",
"config": "^3.2.0",
2 changes: 1 addition & 1 deletion src/reducers/challenge.js
Original file line number Diff line number Diff line change
@@ -469,7 +469,7 @@ export function factory(options = {}) {
tokens.tokenV2,
)).then((res) => {
const challengeDetails = _.get(res, 'payload', {});
const track = _.get(challengeDetails, 'legacy.track', '');
const track = _.get(challengeDetails, 'track', '');
let checkpointsPromise = null;
if (track === COMPETITION_TRACKS.DESIGN) {
const p = _.get(challengeDetails, 'phases', [])
6 changes: 4 additions & 2 deletions src/services/challenges.js
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ export function normalizeChallenge(challenge, username) {
}
const prizes = (challenge.prizeSets[0] && challenge.prizeSets[0].prizes) || [];
_.defaults(challenge, {
communities: new Set([COMPETITION_TRACKS[challenge.legacy.track]]),
communities: new Set([COMPETITION_TRACKS[challenge.track]]),
groups,
registrationOpen,
submissionEndTimestamp,
@@ -407,7 +407,9 @@ class ChallengesService {
.then(checkErrorV5).then(res => res.result);

/* API will return all roles to currentUser, so need to filter in FE */
registrants = _.filter(registrants, r => r.roleId === roleId);
if (roleId) {
registrants = _.filter(registrants, r => r.roleId === roleId);
}

return registrants || [];
}