@@ -258,16 +258,24 @@ export function isValidChallengeCompletion(req, res, next) {
258
258
message : 'That does not appear to be a valid challenge submission.'
259
259
} ;
260
260
261
+ console . debug ( 'console.debug' ) ;
262
+ console . info ( 'console.info' ) ;
263
+ console . error ( 'console.error' ) ;
264
+ console . log ( 'console.log' ) ;
265
+
261
266
if ( ! ObjectID . isValid ( id ) ) {
262
267
log ( 'isObjectId' , id , ObjectID . isValid ( id ) ) ;
268
+ console . debug ( 'isObjectId' , id , ObjectID . isValid ( id ) ) ;
263
269
return res . status ( 403 ) . json ( isValidChallengeCompletionErrorMsg ) ;
264
270
}
265
271
if ( 'challengeType' in req . body && ! isNumeric ( String ( challengeType ) ) ) {
266
272
log ( 'challengeType' , challengeType , isNumeric ( challengeType ) ) ;
273
+ console . debug ( 'challengeType' , challengeType , isNumeric ( challengeType ) ) ;
267
274
return res . status ( 403 ) . json ( isValidChallengeCompletionErrorMsg ) ;
268
275
}
269
276
if ( 'solution' in req . body && ! isURL ( solution ) ) {
270
- log ( 'isObjectId' , id , ObjectID . isValid ( id ) ) ;
277
+ log ( 'solution' , solution , ! isURL ( solution ) ) ;
278
+ console . debug ( 'solution' , solution , ! isURL ( solution ) ) ;
271
279
return res . status ( 403 ) . json ( isValidChallengeCompletionErrorMsg ) ;
272
280
}
273
281
return next ( ) ;
0 commit comments