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

fix-issues/453 #95

Merged
merged 1 commit into from
Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions models/Project.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ const schema = new Schema({
required: true
},
tags: {
type: Array,
type: String,
required: true,
default: []
default: ''
},
rocketChatWebhook: {type: String, required: false},
rocketChatChannelName: {type: String, required: false},
Expand Down
4 changes: 2 additions & 2 deletions services/ChallengeService.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const dbHelper = require('../utils/db-helper');
* @param {Object} event the event
*/
async function handleChallengeTagsUpdate(event) {
const tags = event.data.tags;
const tags = event.data.tags.split(',');
await Promise.all(
event.data.challengeUUIDsList.map(async (challengeUUIDs) => {
if (_.isString(challengeUUIDs)) { // repoUrl
Expand Down Expand Up @@ -54,7 +54,7 @@ process.schema = Joi.object().keys({
challengeUUIDsList: Joi.array().items(
Joi.alternatives().try(Joi.string(), Joi.array().items(Joi.string()))
).required(),
tags: Joi.array().items(Joi.string().required()).min(1).required()
tags: Joi.string().required()
}).required(),
retryCount: Joi.number().integer().default(0).optional()
});
Expand Down
2 changes: 1 addition & 1 deletion services/CopilotPaymentService.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ async function handlePaymentAdd(event, payment) {
const newChallenge = {
name: challengeTitle,
projectId: project.tcDirectId,
tags: project.tags,
tags: project.tags.split(','),
detailedRequirements: challengeRequirements,
prizes: [payment.amount],
reviewType: 'INTERNAL'
Expand Down
2 changes: 1 addition & 1 deletion services/IssueService.js
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ async function handleIssueCreate(event, issue, forceAssign = false) {
issue.challengeUUID = await topcoderApiHelper.createChallenge({
name: issue.title,
projectId,
tags: project.tags,
tags: project.tags.split(','),
detailedRequirements: issue.body,
prizes: issue.prizes
});
Expand Down