diff --git a/.circleci/config.yml b/.circleci/config.yml index 19a2a8fd..243dd8f1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -72,6 +72,7 @@ workflows: - develop - fix/challenge-timelines-edit-routes - test/performance-profile + - ss-bughunt # Production builds are exectuted only on tagged commits to the # master branch. diff --git a/README.md b/README.md index d7b768a6..1662ae29 100644 --- a/README.md +++ b/README.md @@ -129,8 +129,10 @@ You can find sample `.env` files inside the `/docs` directory. npm run services:up ``` -4. ♻ Update following two parts: -- https://github.com/topcoder-platform/challenge-api/blob/develop/src/models/Challenge.js#L116 +4. ♻ Update following three parts: +- https://github.com/topcoder-platform/challenge-api/blob/develop/src/models/Challenge.js#L140 + `throughput: 'ON_DEMAND',` should be updated to `throughput:{ read: 4, write: 2 },` +- https://github.com/topcoder-platform/challenge-api/blob/develop/src/models/Phase.js#L33 `throughput: 'ON_DEMAND',` should be updated to `throughput:{ read: 4, write: 2 },` - https://github.com/topcoder-platform/challenge-api/blob/develop/config/default.js#L27-L28 diff --git a/src/common/helper.js b/src/common/helper.js index 05f394fc..9448002d 100644 --- a/src/common/helper.js +++ b/src/common/helper.js @@ -494,14 +494,15 @@ async function createSelfServiceProject (name, description, type, token) { const res = await axios.post(url, projectObj, { headers: { Authorization: `Bearer ${token}` } }) const projectId = _.get(res, 'data.id') const phaseUrl = `${config.PROJECTS_API_URL}/${projectId}/phases` - const phaseStartDate = Date.now() - const phaseEndDate = Date.now() + const phaseStartDate = new Date() + const phaseEndDate = new Date() phaseEndDate.setMonth(phaseEndDate.getMonth() + 3) const phaseObj = { name: 'project main phase', description: 'default 90-day phase generated by self-service APIs', - startDate: phaseStartDate, - endDate: phaseEndDate + startDate: phaseStartDate.getTime(), + endDate: phaseEndDate.getTime(), + status: 'draft' } await axios.post(phaseUrl, phaseObj, { headers: { Authorization: `Bearer ${token}` } }) return projectId