Skip to content

Commit 121e4dc

Browse files
author
James Cori
committed
Fixing prizeSets structure
1 parent 63e8b40 commit 121e4dc

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

services/CopilotPaymentService.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ async function _updateChallenge(copilotUsername, projectId, challengeId) {
116116
name: challengeTitle,
117117
detailedRequirements: requirements,
118118
prizeSets: [{
119-
type: 'Challenge prizes',
120-
prizes: _.map(prizes, (prize) => ({type: 'money', value: prize}))
119+
type: 'copilot',
120+
prizes: _.map(prizes, (prize) => ({type: 'USD', value: prize}))
121121
}]
122122
};
123123

services/IssueService.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ async function handleIssueUpdate(event, issue) {
343343
name: issue.title,
344344
description: issue.body,
345345
prizeSets: [{
346-
type: 'Challenge prizes',
347-
prizes: _.map(issue.prizes, (prize) => ({type: 'money', value: prize}))
346+
type: 'placement',
347+
prizes: _.map(issue.prizes, (prize) => ({type: 'USD', value: prize}))
348348
}]
349349
});
350350
// Save
@@ -476,8 +476,8 @@ async function handleIssueClose(event, issue) { // eslint-disable-line
476476
// prize needs to be again set after adding billing account otherwise it won't let activate
477477
const updateBody = {
478478
prizeSets: [{
479-
type: 'Challenge prizes',
480-
prizes: _.map(issue.prizes, (prize) => ({type: 'money', value: prize}))
479+
type: 'placement',
480+
prizes: _.map(issue.prizes, (prize) => ({type: 'USD', value: prize}))
481481
}]
482482
};
483483
await topcoderApiHelper.updateChallenge(dbIssue.challengeUUID, updateBody);

utils/topcoder-api-helper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ async function createChallenge(challenge) {
7070
name: challenge.name,
7171
description: challenge.detailedRequirements,
7272
prizeSets: [{
73-
type: 'Challenge prizes',
74-
prizes: _.map(challenge.prizes, (prize) => ({type: 'money', value: prize}))
73+
type: 'placement',
74+
prizes: _.map(challenge.prizes, (prize) => ({type: 'USD', value: prize}))
7575
}],
7676
timelineTemplateId: config.DEFAULT_TIMELINE_TEMPLATE_ID,
7777
projectId: challenge.projectId,

0 commit comments

Comments
 (0)