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 +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -94,16 +94,18 @@ async function queueSync (req, res) {
94
94
// Target a single challenge based on the provided legacyId if provided
95
95
await syncController . queueChallenges ( { legacyId : req . query . legacyId , force } )
96
96
} else {
97
- const startDate = req . query . startDate
98
- const endDate = req . query . endDate ? moment ( req . query . endDate ) . utc ( ) : moment ( ) . utc ( )
99
-
100
- if ( startDate !== null && ( ! moment ( startDate ) || ! moment ( startDate ) . isValid ( ) ) ) {
101
- return res . status ( 400 ) . json ( { message : `Invalid startDate: ${ startDate } ` } )
102
- }
103
- if ( endDate !== null && ( ! moment ( endDate ) || ! moment ( endDate ) . isValid ( ) ) ) {
104
- return res . status ( 400 ) . json ( { message : `Invalid endDate: ${ endDate } ` } )
105
- }
106
- await syncController . queueChallenges ( { startDate, endDate, force } )
97
+ return res . status ( 400 ) . json ( { message : `Missing property 'legacyId'` } )
98
+
99
+ // const startDate = req.query.startDate
100
+ // const endDate = req.query.endDate ? moment(req.query.endDate).utc() : moment().utc()
101
+
102
+ // if (startDate !== null && (!moment(startDate) || !moment(startDate).isValid())) {
103
+ // return res.status(400).json({ message: `Invalid startDate: ${startDate}` })
104
+ // }
105
+ // if (endDate !== null && (!moment(endDate) || !moment(endDate).isValid())) {
106
+ // return res.status(400).json({ message: `Invalid endDate: ${endDate}` })
107
+ // }
108
+ // await syncController.queueChallenges({ startDate, endDate, force })
107
109
}
108
110
109
111
return res . json ( { success : true } )
You can’t perform that action at this time.
0 commit comments