@@ -788,7 +788,7 @@ var getChallenge = function (api, connection, dbConnectionMap, isStudio, next) {
788
788
submissionEndDate : formatDate ( data . submission_end_date )
789
789
} ;
790
790
791
- if ( connection . action == "getChallenge" ) {
791
+ if ( connection . action === "getChallenge" ) {
792
792
challenge . type = isStudio ? 'design' : 'develop' ;
793
793
}
794
794
@@ -1023,7 +1023,7 @@ var submitForDevelopChallenge = function (api, connection, dbConnectionMap, next
1023
1023
console . log ( '-------------------------------------------' ) ;
1024
1024
console . log ( stats . size + '\t' + api . config . submissionMaxSizeBytes ) ;
1025
1025
console . log ( '-------------------------------------------' ) ;
1026
-
1026
+
1027
1027
if ( stats . size > api . config . submissionMaxSizeBytes ) {
1028
1028
cb ( new RequestTooLargeError (
1029
1029
"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
1049
1049
fileName : uploadId + "_" + fileName
1050
1050
} ) ;
1051
1051
api . dataAccess . executeQuery ( "insert_upload" , sqlParams , dbConnectionMap , cb ) ;
1052
- } , function ( notUsed , cb ) {
1052
+ } , function ( notUsed , cb ) {
1053
1053
//Now check if the contest is a CloudSpokes one and if it needs to submit the thurgood job
1054
1054
if ( ! _ . isUndefined ( thurgoodPlatform ) && ! _ . isUndefined ( thurgoodLanguage ) && type === 'final' ) {
1055
1055
//Make request to the thurgood job api url
@@ -1530,7 +1530,7 @@ exports.getChallenge = {
1530
1530
name : "getChallenge" ,
1531
1531
description : "getStudioChallenge" ,
1532
1532
inputs : {
1533
- required : [ "contestId " ] ,
1533
+ required : [ "challengeId " ] ,
1534
1534
optional : [ "refresh" ]
1535
1535
} ,
1536
1536
blockedConnectionTypes : [ ] ,
@@ -1541,11 +1541,11 @@ exports.getChallenge = {
1541
1541
run : function ( api , connection , next ) {
1542
1542
if ( connection . dbConnectionMap ) {
1543
1543
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 ) {
1545
1545
if ( err ) {
1546
1546
api . helper . handleError ( api , connection , err ) ;
1547
1547
next ( connection , true ) ;
1548
- } else if ( result . length == 0 ) {
1548
+ } else if ( result . length === 0 ) {
1549
1549
api . helper . handleError ( api , connection , new NotFoundError ( "Challenge not found." ) ) ;
1550
1550
next ( connection , true ) ;
1551
1551
} else {
0 commit comments