diff --git a/src/actions/challenge.js b/src/actions/challenge.js index a2d538ab..86655807 100644 --- a/src/actions/challenge.js +++ b/src/actions/challenge.js @@ -248,7 +248,7 @@ function loadResultsInit(challengeId) { * @return {Action} */ function loadResultsDone(auth, challengeId, type) { - return getApi('V2', auth.tokenV2) + return getApi('V2') .fetch(`/${type}/challenges/result/${challengeId}`) .then(response => response.json()) .then(response => ({ @@ -273,7 +273,7 @@ function fetchCheckpointsInit() {} */ function fetchCheckpointsDone(tokenV2, challengeId) { const endpoint = `/design/challenges/checkpoint/${challengeId}`; - return getApi('V2', tokenV2).fetch(endpoint) + return getApi('V2').fetch(endpoint) .then((response) => { if (response.status !== 200) { throw response.status; diff --git a/src/reducers/challenge.js b/src/reducers/challenge.js index e706cb07..7dde8670 100644 --- a/src/reducers/challenge.js +++ b/src/reducers/challenge.js @@ -173,7 +173,7 @@ function onFetchCheckpointsDone(state, action) { loadingCheckpoints: false, }; } - if (state.details && state.details.legacyId === action.payload.challengeId) { + if (state.details && `${state.details.legacyId}` === `${action.payload.challengeId}`) { return { ...state, checkpoints: action.payload.checkpoints,