Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 84fffa0

Browse files
authored
Merge pull request #95 from 52cs/fix-issue-453
fix-issues/453
2 parents f152f09 + 6997d3c commit 84fffa0

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

models/Project.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ const schema = new Schema({
2424
required: true
2525
},
2626
tags: {
27-
type: Array,
27+
type: String,
2828
required: true,
29-
default: []
29+
default: ''
3030
},
3131
rocketChatWebhook: {type: String, required: false},
3232
rocketChatChannelName: {type: String, required: false},

services/ChallengeService.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const dbHelper = require('../utils/db-helper');
2020
* @param {Object} event the event
2121
*/
2222
async function handleChallengeTagsUpdate(event) {
23-
const tags = event.data.tags;
23+
const tags = event.data.tags.split(',');
2424
await Promise.all(
2525
event.data.challengeUUIDsList.map(async (challengeUUIDs) => {
2626
if (_.isString(challengeUUIDs)) { // repoUrl
@@ -54,7 +54,7 @@ process.schema = Joi.object().keys({
5454
challengeUUIDsList: Joi.array().items(
5555
Joi.alternatives().try(Joi.string(), Joi.array().items(Joi.string()))
5656
).required(),
57-
tags: Joi.array().items(Joi.string().required()).min(1).required()
57+
tags: Joi.string().required()
5858
}).required(),
5959
retryCount: Joi.number().integer().default(0).optional()
6060
});

services/CopilotPaymentService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ async function handlePaymentAdd(event, payment) {
194194
const newChallenge = {
195195
name: challengeTitle,
196196
projectId: project.tcDirectId,
197-
tags: project.tags,
197+
tags: project.tags.split(','),
198198
detailedRequirements: challengeRequirements,
199199
prizes: [payment.amount],
200200
reviewType: 'INTERNAL'

services/IssueService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ async function handleIssueCreate(event, issue, forceAssign = false) {
636636
issue.challengeUUID = await topcoderApiHelper.createChallenge({
637637
name: issue.title,
638638
projectId,
639-
tags: project.tags,
639+
tags: project.tags.split(','),
640640
detailedRequirements: issue.body,
641641
prizes: issue.prizes
642642
});

0 commit comments

Comments
 (0)