Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

inactive users shouldn't be allowed to register for challenges #429

Merged
merged 1 commit into from
May 28, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions actions/challengeRegistration.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion apiary.apib
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down