Skip to content

Commit 27355a6

Browse files
Add support for challenge terms
1 parent 54e2592 commit 27355a6

File tree

7 files changed

+884
-629
lines changed

7 files changed

+884
-629
lines changed

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ info: Done!
192192
`bin/kafka-console-producer.sh --broker-list localhost:9092 --topic challenge.notification.update`
193193

194194
- write message to partially update data:
195-
`{ "topic": "challenge.notification.update", "originator": "challenge-api", "timestamp": "2019-02-17T01:00:00", "mime-type": "application/json", "payload": { "id": "173803d3-019e-4033-b1cf-d7205c7f774c", "typeId": "8e17090c-465b-4c17-b6d9-dfa16300b0ff", "track": "Code", "name": "test3", "description": "desc3", "timelineTemplateId": "8e17090c-465b-4c17-b6d9-dfa16300b0dd", "groups": ["group2", "group3"], "updated": "2019-02-17T01:00:00", "updatedBy": "admin" } }`
195+
`{"topic":"challenge.notification.update","originator":"challenge-api","timestamp":"2019-02-17T01:00:00","mime-type":"application/json","payload":{"id":"173803d3-019e-4033-b1cf-d7205c7f774c","typeId":"8e17090c-465b-4c17-b6d9-dfa16300b0ff","track":"Code","name":"test3","description":"desc3","timelineTemplateId":"8e17090c-465b-4c17-b6d9-dfa16300b0dd","groups":["group2","group3"],"updated":"2019-02-17T01:00:00","updatedBy":"admin","terms":[{"id":21343,"agreeabilityType":"DocuSignable","title":"Competition Non-Disclosure Agreement","url":"","templateId":"0c5b7081-1fff-4484-a20f-824c97a03b9b"},{"id":20723,"agreeabilityType":"Non-electronically-agreeable","title":"Subcontractor Services Agreement 2009-09-02","url":"http://www.topcoder.com/i/terms/Subcontractor+Services+Agreement+2009-09-02.pdf"}]}}`
196196
- run command `npm run view-data 173803d3-019e-4033-b1cf-d7205c7f774c` to view the updated data, you will see the data are properly updated:
197197

198198
```bash
@@ -237,12 +237,26 @@ info: {
237237
"group2",
238238
"group3"
239239
],
240+
"terms": [
241+
{
242+
"id": 21343,
243+
"agreeabilityType": "DocuSignable",
244+
"title": "Competition Non-Disclosure Agreement",
245+
"url": "",
246+
"templateId": "0c5b7081-1fff-4484-a20f-824c97a03b9b"
247+
},
248+
{
249+
"id": 20723,
250+
"agreeabilityType": "Non-electronically-agreeable",
251+
"title": "Subcontractor Services Agreement 2009-09-02",
252+
"url": "http://www.topcoder.com/i/terms/Subcontractor+Services+Agreement+2009-09-02.pdf"
253+
}],
240254
"updated": "2019-02-16T17:00:00.000Z"
241255
}
242256
info: Done!
243257
```
244258
- write message to update data:
245-
`{ "topic": "challenge.notification.update", "originator": "challenge-api", "timestamp": "2019-02-17T00:00:00", "mime-type": "application/json", "payload": { "id": "173803d3-019e-4033-b1cf-d7205c7f774c", "typeId": "45415132-79fa-4d13-a9ac-71f50020dc10", "track": "Code", "name": "test", "description": "a b c", "challengeSettings": [{ "type": "2d88c598-70f0-4054-8a45-7da38d0ca424", "value": "ab" }], "timelineTemplateId": "8e17090c-465b-4c17-b6d9-dfa16300b0aa", "phases": [{ "id": "8e17090c-465b-4c17-b6d9-dfa16300b012", "phaseId": "8e17090c-465b-4c17-b6d9-dfa16300b013", "isOpen": true, "duration": 2000 }], "prizeSets": [{ "type": "prize", "prizes": [{ "type": "win", "value": 90 }] }], "reviewType": "code", "tags": ["tag1", "tag2"], "projectId": 12, "forumId": 45, "legacyId": 55, "status": "Active", "groups": ["g2"], "startDate": "2019-07-17T00:00:00", "updated": "2019-02-17T00:00:00", "updatedBy": "user" } }`
259+
`{"topic":"challenge.notification.update","originator":"challenge-api","timestamp":"2019-02-17T00:00:00","mime-type":"application/json","payload":{"id":"173803d3-019e-4033-b1cf-d7205c7f774c","typeId":"45415132-79fa-4d13-a9ac-71f50020dc10","track":"Code","name":"test","description":"a b c","challengeSettings":[{"type":"2d88c598-70f0-4054-8a45-7da38d0ca424","value":"ab"}],"timelineTemplateId":"8e17090c-465b-4c17-b6d9-dfa16300b0aa","phases":[{"id":"8e17090c-465b-4c17-b6d9-dfa16300b012","phaseId":"8e17090c-465b-4c17-b6d9-dfa16300b013","isOpen":true,"duration":2000}],"prizeSets":[{"type":"prize","prizes":[{"type":"win","value":90}]}],"reviewType":"code","tags":["tag1","tag2"],"projectId":12,"forumId":45,"legacyId":55,"status":"Active","groups":["g2"],"terms":[{"id":21343,"agreeabilityType":"DocuSignable","title":"Competition Non-Disclosure Agreement","url":"","templateId":"0c5b7081-1fff-4484-a20f-824c97a03b9b"}],"startDate":"2019-07-17T00:00:00","updated":"2019-02-17T00:00:00","updatedBy":"user"}}`
246260
- run command `npm run view-data 173803d3-019e-4033-b1cf-d7205c7f774c` to view the updated data, you will see the data are properly updated:
247261

248262
```bash
@@ -295,6 +309,14 @@ info: {
295309
"value": "ab"
296310
}
297311
],
312+
"terms": [
313+
{
314+
"id": 21343,
315+
"agreeabilityType": "DocuSignable",
316+
"title": "Competition Non-Disclosure Agreement",
317+
"url": "",
318+
"templateId": "0c5b7081-1fff-4484-a20f-824c97a03b9b"
319+
}],
298320
"currentPhase": {
299321
"duration": 2000,
300322
"isOpen": true,

0 commit comments

Comments
 (0)