Skip to content

Commit 32df523

Browse files
committed
fix: allow setting schedule start date
1 parent 665dba5 commit 32df523

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/common/phase-helper.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,9 @@ class ChallengePhaseHelper {
8181
if (p.name === 'Submission') {
8282
if (p.scheduledStartDate != null) {
8383
p.scheduledStartDate = moment(p.scheduledStartDate).toDate()
84-
}
85-
else {
84+
} else {
8685
p.scheduledStartDate = moment(startDate).add(5, 'minutes').toDate()
8786
}
88-
8987
}
9088

9189
if (moment(p.scheduledStartDate).isSameOrBefore(moment())) {

src/services/ChallengeService.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2109,7 +2109,8 @@ fullyUpdateChallenge.schema = {
21092109
phaseId: Joi.id(),
21102110
duration: Joi.number().integer().min(0),
21112111
isOpen: Joi.boolean(),
2112-
actualEndDate: Joi.date().allow(null)
2112+
actualEndDate: Joi.date().allow(null),
2113+
scheduledStartDate: Joi.date().allow(null),,
21132114
}).unknown(true)),
21142115
prizeSets: Joi.array().items(Joi.object().keys({
21152116
type: Joi.string().valid(_.values(constants.prizeSetTypes)).required(),

0 commit comments

Comments
 (0)