diff --git a/actions/challengeRegistration.js b/actions/challengeRegistration.js index 8f73c9020..4072e1b38 100644 --- a/actions/challengeRegistration.js +++ b/actions/challengeRegistration.js @@ -869,9 +869,12 @@ exports.registerChallenge = { if (error) { console.log("error: " + error); cb(error); - } else { - console.log("error11: " + error); - api.dataAccess.executeQuery('check_challenge_exists', {challengeId: challengeId}, connection.dbConnectionMap, cb); + } else { + api.helper.checkUserActivated(connection.caller.handle, api, connection.dbConnectionMap, function (err, inactive) { + var fail = err || inactive; + if (fail) cb(fail); + else api.dataAccess.executeQuery('check_challenge_exists', {challengeId: challengeId}, connection.dbConnectionMap, cb); + }); } }, function (result, cb) { if (result.length > 0) { diff --git a/apiary.apib b/apiary.apib index 955a88fc9..f7dd6dcd6 100644 --- a/apiary.apib +++ b/apiary.apib @@ -9946,7 +9946,7 @@ Request } ## Register for a software/studio challenge [/challenges/{challengeId}/register] -### Register for a software/studio challenge [GET] +### Register for a software/studio challenge [POST] + Parameters + challengeId (required, number, `1234567`) ... The challenge for which to register