@@ -40,7 +40,7 @@ async function getPlatforms (m2mToken) {
40
40
* @returns {Object } challenge response body
41
41
*/
42
42
async function getChallengeById ( m2mToken , legacyId ) {
43
- const response = await helper . getRequest ( `${ config . V4_CHALLENGE_API_URL } ?filter=id= ${ legacyId } ` , m2mToken )
43
+ const response = await helper . getRequest ( `${ config . V4_CHALLENGE_API_URL } / ${ legacyId } ` , m2mToken )
44
44
return _ . get ( response , 'body.result.content[0]' )
45
45
}
46
46
@@ -270,14 +270,15 @@ async function processUpdate (message) {
270
270
throw new Error ( `Could not find challenge ${ message . payload . legacyId } ` )
271
271
}
272
272
// we can't switch the challenge type
273
- if ( message . payload . legacy . track ) {
274
- const newTrack = message . payload . legacy . track
275
- // track information is stored in subTrack of V4 API
276
- if ( challenge . track !== newTrack ) {
277
- // refer ContestDirectManager.prepare in ap-challenge-microservice
278
- throw new Error ( 'You can\'t change challenge track' )
279
- }
280
- }
273
+ // TODO: track is missing from the response.
274
+ // if (message.payload.legacy.track) {
275
+ // const newTrack = message.payload.legacy.track
276
+ // // track information is stored in subTrack of V4 API
277
+ // if (challenge.track !== newTrack) {
278
+ // // refer ContestDirectManager.prepare in ap-challenge-microservice
279
+ // throw new Error('You can\'t change challenge track')
280
+ // }
281
+ // }
281
282
282
283
await helper . putRequest ( `${ config . V4_CHALLENGE_API_URL } /${ message . payload . legacyId } ` , { param : saveDraftContestDTO } , m2mToken )
283
284
} catch ( e ) {
0 commit comments