Skip to content

Commit 7752094

Browse files
TCA-385 #comment This commit adds logging #time 5m
1 parent 54b1a70 commit 7752094

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

api-server/src/server/boot/challenge.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,16 +258,24 @@ export function isValidChallengeCompletion(req, res, next) {
258258
message: 'That does not appear to be a valid challenge submission.'
259259
};
260260

261+
console.debug('console.debug');
262+
console.info('console.info');
263+
console.error('console.error');
264+
console.log('console.log');
265+
261266
if (!ObjectID.isValid(id)) {
262267
log('isObjectId', id, ObjectID.isValid(id));
268+
console.debug('isObjectId', id, ObjectID.isValid(id));
263269
return res.status(403).json(isValidChallengeCompletionErrorMsg);
264270
}
265271
if ('challengeType' in req.body && !isNumeric(String(challengeType))) {
266272
log('challengeType', challengeType, isNumeric(challengeType));
273+
console.debug('challengeType', challengeType, isNumeric(challengeType));
267274
return res.status(403).json(isValidChallengeCompletionErrorMsg);
268275
}
269276
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));
271279
return res.status(403).json(isValidChallengeCompletionErrorMsg);
272280
}
273281
return next();

0 commit comments

Comments
 (0)