Skip to content

Commit 2481c12

Browse files
Change projects API to v5 and change challenge.winners type
1 parent 751e3ea commit 2481c12

File tree

5 files changed

+44
-10
lines changed

5 files changed

+44
-10
lines changed

config/default.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module.exports = {
4646
? Number(process.env.FILE_UPLOAD_SIZE_LIMIT) : 50 * 1024 * 1024, // 50M
4747
RESOURCES_API_URL: process.env.RESOURCES_API_URL || 'http://localhost:4000/v5/resources',
4848
GROUPS_API_URL: process.env.GROUPS_API_URL || 'http://localhost:4000/v5/groups',
49-
PROJECTS_API_URL: process.env.PROJECTS_API_URL || 'http://localhost:4000/v4/projects',
49+
PROJECTS_API_URL: process.env.PROJECTS_API_URL || 'http://localhost:4000/v5/projects',
5050
// copilot resource role ids allowed to upload attachment
5151
COPILOT_RESOURCE_ROLE_IDS: process.env.COPILOT_RESOURCE_ROLE_IDS
5252
? process.env.COPILOT_RESOURCE_ROLE_IDS.split(',') : ['10ba038e-48da-487b-96e8-8d3b99b6d18b'],

mock-api/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ app.get('/v5/resources/:memberId/challenges', (req, res) => {
6464
})
6565

6666
// get project by id
67-
app.get('/v4/projects/:projectId', (req, res) => {
67+
app.get('/v5/projects/:projectId', (req, res) => {
6868
const projectId = req.params.projectId
6969
if (projectId === '111' || projectId === '123' || projectId === '112233') {
7070
res.end()

package-lock.json

Lines changed: 40 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/models/Challenge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const schema = new Schema({
9696
},
9797
// winners
9898
winners: {
99-
type: [Object],
99+
type: Array,
100100
required: false
101101
},
102102
created: {

src/scripts/seed/ChallengeType.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
"name": "Automated Testing",
221221
"description": "Automated Testing",
222222
"isActive": true,
223-
"abbreviation": null,
223+
"abbreviation": "AUTOMATED_TESTING",
224224
"legacyId": 41
225225
}
226226
]

0 commit comments

Comments
 (0)