This repository was archived by the owner on Jan 23, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -303,7 +303,7 @@ async function processUpdate (message) {
303
303
if ( message . payload . status === constants . challengeStatuses . Completed && challenge . currentStatus !== constants . challengeStatuses . Completed ) {
304
304
const challengeUuid = message . payload . id
305
305
const v5Challenge = await helper . getRequest ( `${ config . V5_CHALLENGE_API_URL } /${ challengeUuid } ` , m2mToken )
306
- if ( v5Challenge . typeId === config . TASK_TYPE_ID ) {
306
+ if ( v5Challenge . body . typeId === config . TASK_TYPE_ID ) {
307
307
logger . info ( 'Challenge type is TASK' )
308
308
if ( ! message . payload . winners || message . payload . winners . length === 0 ) {
309
309
throw new Error ( 'Cannot close challenge without winners' )
@@ -312,7 +312,7 @@ async function processUpdate (message) {
312
312
logger . info ( `Will close the challenge with ID ${ message . payload . legacyId } . Winner ${ winnerId } !` )
313
313
await closeChallenge ( message . payload . legacyId , winnerId )
314
314
} else {
315
- logger . info ( `Challenge type is ${ v5Challenge . typeId } .. Skip closing challenge...` )
315
+ logger . info ( `Challenge type is ${ v5Challenge . body . typeId } .. Skip closing challenge...` )
316
316
}
317
317
}
318
318
}
You can’t perform that action at this time.
0 commit comments