Skip to content

Commit c530fe9

Browse files
Merge pull request #275 from topcoder-platform/issue-5121
Remove token from v2 calls (checkpoint and results)
2 parents 3b24352 + f12d6d6 commit c530fe9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/actions/challenge.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ function loadResultsInit(challengeId) {
248248
* @return {Action}
249249
*/
250250
function loadResultsDone(auth, challengeId, type) {
251-
return getApi('V2', auth.tokenV2)
251+
return getApi('V2')
252252
.fetch(`/${type}/challenges/result/${challengeId}`)
253253
.then(response => response.json())
254254
.then(response => ({
@@ -273,7 +273,7 @@ function fetchCheckpointsInit() {}
273273
*/
274274
function fetchCheckpointsDone(tokenV2, challengeId) {
275275
const endpoint = `/design/challenges/checkpoint/${challengeId}`;
276-
return getApi('V2', tokenV2).fetch(endpoint)
276+
return getApi('V2').fetch(endpoint)
277277
.then((response) => {
278278
if (response.status !== 200) {
279279
throw response.status;

src/reducers/challenge.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ function onFetchCheckpointsDone(state, action) {
173173
loadingCheckpoints: false,
174174
};
175175
}
176-
if (state.details && state.details.legacyId === action.payload.challengeId) {
176+
if (state.details && `${state.details.legacyId}` === `${action.payload.challengeId}`) {
177177
return {
178178
...state,
179179
checkpoints: action.payload.checkpoints,

0 commit comments

Comments
 (0)