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

Commit bfa0908

Browse files
#2 - correct submission type
1 parent 8b460ae commit bfa0908

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

docs/SubmissionsApi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,14 @@ const reqFormData1 = {
137137
name: 'fileToUpload.zip',
138138
data: fileData // a Buffer contain file content
139139
},
140-
type: 'ContestSubmission',
140+
type: 'Contest Submission',
141141
memberId: 40493050,
142142
challengeId: 30054692
143143
}
144144

145145
const reqFormData2 = {
146146
url: 'https://tc-test-submission-scan.s3.amazonaws.com/good.zip',
147-
type: 'ContestSubmission',
147+
type: 'Contest Submission',
148148
memberId: 40493050,
149149
challengeId: 30054692
150150
}
@@ -326,7 +326,7 @@ const submissionApiClient = submissionApi(_.pick(config,
326326
const submissionId = '8f4e8b6a-0ad2-4ff6-ab19-afeb102ff3b4'
327327
const reqBody = {
328328
url: 'https://tc-test-submission-scan.s3.amazonaws.com/good.zip',
329-
type: 'ContestSubmission',
329+
type: 'Contest Submission',
330330
memberId: 40493050,
331331
challengeId: 30054692
332332
}
@@ -378,7 +378,7 @@ const submissionApiClient = submissionApi(_.pick(config,
378378
const submissionId = '8f4e8b6a-0ad2-4ff6-ab19-afeb102ff3b4'
379379
const reqBody = {
380380
url: 'https://tc-test-submission-scan.s3.amazonaws.com/good.zip',
381-
type: 'ContestSubmission'
381+
type: 'Contest Submission'
382382
}
383383

384384
// Promise model

test/SubmissionApi.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const failClient = api(_.assign(_.cloneDeep(config), { 'AUTH0_CLIENT_ID': 'inval
1414
const fileData1 = fs.readFileSync(path.resolve(__dirname, './data/fileToUpload.zip'))
1515
const fileData2 = fs.readFileSync(path.resolve(__dirname, './data/good.zip'))
1616
const notFoundId = 'e0a789ea-6144-4266-bfae-872f9a26e749'
17-
const type = 'ContestSubmission'
17+
const type = 'Contest Submission'
1818
const memberId = 40493050
1919
const challengeId = 30054692
2020
const url = 'https://tc-test-submission-scan.s3.amazonaws.com/good.zip'
@@ -395,12 +395,12 @@ describe('Submission API Tests', () => {
395395
describe('Test patch submission', () => {
396396
it(`Patch submission success`, async () => {
397397
const res = await client.patchSubmission(createdSubmissionId2, {
398-
type: 'contestSubmission',
398+
type: 'Contest Submission',
399399
legacyUploadId: 1000000
400400
})
401401
should.equal(res.status, 200)
402402
should.equal(res.body.id, createdSubmissionId2)
403-
should.equal(res.body.type, 'contestSubmission')
403+
should.equal(res.body.type, 'Contest Submission')
404404
should.equal(res.body.memberId, memberId)
405405
should.equal(res.body.challengeId, challengeId)
406406
should.equal(res.body.url, url)

test/data/Submissions.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[
22
{
33
"id": "a12a4180-65aa-42ec-a945-5fd21dec0501",
4-
"type": "ContestSubmission",
4+
"type": "Contest Submission",
55
"url": "https://software.topcoder.com/review/actions/DownloadContestSubmission?uid=123456",
66
"memberId": "b24d4180-65aa-42ec-a945-5fd21dec0501",
77
"challengeId": "c3564180-65aa-42ec-a945-5fd21dec0502",
@@ -51,7 +51,7 @@
5151
},
5252
{
5353
"id": "a12a4180-65aa-42ec-a945-5fd21dec0502",
54-
"type": "ContestSubmission",
54+
"type": "Contest Submission",
5555
"url": "https://software.topcoder.com/review/actions/DownloadContestSubmission?uid=123457",
5656
"memberId": "b24d4180-65aa-42ec-a945-5fd21dec0502",
5757
"challengeId": "c3564180-65aa-42ec-a945-5fd21dec0502",
@@ -62,7 +62,7 @@
6262
},
6363
{
6464
"id": "a12a4180-65aa-42ec-a945-5fd21dec0503",
65-
"type": "ContestSubmission",
65+
"type": "Contest Submission",
6666
"url": "https://software.topcoder.com/review/actions/DownloadContestSubmission?uid=123458",
6767
"memberId": "b24d4180-65aa-42ec-a945-5fd21dec0503",
6868
"challengeId": "c3564180-65aa-42ec-a945-5fd21dec0503",
@@ -111,7 +111,7 @@
111111
},
112112
{
113113
"id": "a12a4180-65aa-42ec-a945-5fd21dec0504",
114-
"type": "ContestSubmission",
114+
"type": "Contest Submission",
115115
"url": "https://software.topcoder.com/review/actions/DownloadContestSubmission?uid=123459",
116116
"memberId": "b24d4180-65aa-42ec-a945-5fd21dec0504",
117117
"challengeId": 30051825,
@@ -148,7 +148,7 @@
148148
},
149149
{
150150
"id": "a12a4180-65aa-42ec-a945-5fd21dec0505",
151-
"type": "ContestSubmission",
151+
"type": "Contest Submission",
152152
"url": "https://software.topcoder.com/review/actions/DownloadContestSubmission?uid=123460",
153153
"memberId": "b24d4180-65aa-42ec-a945-5fd21dec0505",
154154
"challengeId": "c3564180-65aa-42ec-a945-5fd21dec0503",
@@ -173,7 +173,7 @@
173173
},
174174
{
175175
"id": "a12a4180-65aa-42ec-a945-5fd21dec0506",
176-
"type": "ContestSubmission",
176+
"type": "Contest Submission",
177177
"url": "https://software.topcoder.com/review/actions/DownloadContestSubmission?uid=123460",
178178
"memberId": "b24d4180-65aa-42ec-a945-5fd21dec0506",
179179
"challengeId": "c3564180-65aa-42ec-a945-5fd21dec0503",

0 commit comments

Comments
 (0)