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

Commit 66a9a65

Browse files
committed
change the parameter name.
1 parent 854c414 commit 66a9a65

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

actions/challenges.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ var getChallenge = function (api, connection, dbConnectionMap, isStudio, next) {
788788
submissionEndDate : formatDate(data.submission_end_date)
789789
};
790790

791-
if (connection.action == "getChallenge") {
791+
if (connection.action === "getChallenge") {
792792
challenge.type = isStudio ? 'design' : 'develop';
793793
}
794794

@@ -1023,7 +1023,7 @@ var submitForDevelopChallenge = function (api, connection, dbConnectionMap, next
10231023
console.log('-------------------------------------------');
10241024
console.log(stats.size + '\t' + api.config.submissionMaxSizeBytes);
10251025
console.log('-------------------------------------------');
1026-
1026+
10271027
if (stats.size > api.config.submissionMaxSizeBytes) {
10281028
cb(new RequestTooLargeError(
10291029
"The submission file size is greater than the max allowed size: " + (api.config.submissionMaxSizeBytes / 1024) + " KB."
@@ -1049,7 +1049,7 @@ var submitForDevelopChallenge = function (api, connection, dbConnectionMap, next
10491049
fileName: uploadId + "_" + fileName
10501050
});
10511051
api.dataAccess.executeQuery("insert_upload", sqlParams, dbConnectionMap, cb);
1052-
}, function(notUsed, cb) {
1052+
}, function (notUsed, cb) {
10531053
//Now check if the contest is a CloudSpokes one and if it needs to submit the thurgood job
10541054
if (!_.isUndefined(thurgoodPlatform) && !_.isUndefined(thurgoodLanguage) && type === 'final') {
10551055
//Make request to the thurgood job api url
@@ -1530,7 +1530,7 @@ exports.getChallenge = {
15301530
name: "getChallenge",
15311531
description: "getStudioChallenge",
15321532
inputs: {
1533-
required: ["contestId"],
1533+
required: ["challengeId"],
15341534
optional: ["refresh"]
15351535
},
15361536
blockedConnectionTypes: [],
@@ -1541,11 +1541,11 @@ exports.getChallenge = {
15411541
run: function (api, connection, next) {
15421542
if (connection.dbConnectionMap) {
15431543
api.log("Execute getChallenge#run", 'debug');
1544-
api.dataAccess.executeQuery('check_challenge_exists', {challengeId: connection.params.contestId}, connection.dbConnectionMap, function(err, result) {
1544+
api.dataAccess.executeQuery('check_challenge_exists', {challengeId: connection.params.contestId}, connection.dbConnectionMap, function (err, result) {
15451545
if (err) {
15461546
api.helper.handleError(api, connection, err);
15471547
next(connection, true);
1548-
} else if (result.length == 0) {
1548+
} else if (result.length === 0) {
15491549
api.helper.handleError(api, connection, new NotFoundError("Challenge not found."));
15501550
next(connection, true);
15511551
} else {

routes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ var testMethods = {
138138
exports.routes = {
139139
get: [
140140
{ path: "/:apiVersion/logs", action: "getLogTail" },
141-
{ path: "/:apiVersion/challenges/:contestId", action: "getChallenge" },
141+
{ path: "/:apiVersion/challenges/:challengeId", action: "getChallenge" },
142142
{ path: "/:apiVersion/challenges", action: "searchSoftwareAndStudioChallenges" },
143143

144144
{ path: "/:apiVersion/develop/challenges/checkpoint/:challengeId", action: "getSoftwareCheckpoint" },

0 commit comments

Comments
 (0)