Skip to content

Commit 8348a23

Browse files
author
Vikas Agarwal
committed
fix: skills-api-shape-up : added env variable for the 5.1 api
1 parent 303277a commit 8348a23

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

config/default.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ module.exports = {
3333

3434
// the Topcoder v5 url
3535
TC_API: process.env.TC_API || 'https://api.topcoder-dev.com/v5',
36+
// the Topcoder Beta API url currently v5.1
37+
TC_BETA_API: process.env.TC_BETA_API || 'https://api.topcoder-dev.com/v5.1',
3638
// the organization id
3739
ORG_ID: process.env.ORG_ID || '36ed815b-3da1-49f1-a043-aaed0a4e81ad',
3840
// the referenced taxonomy id

src/common/helper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,7 @@ async function getTopcoderSkills (criteria) {
12261226
const token = await getM2MUbahnToken()
12271227
try {
12281228
const res = await request
1229-
.get(`${config.TC_API}/skills`)
1229+
.get(`${config.TC_BETA_API}/skills`)
12301230
.query({
12311231
taxonomyId: config.TOPCODER_TAXONOMY_ID,
12321232
...criteria
@@ -1278,7 +1278,7 @@ async function getAllTopcoderSkills (criteria) {
12781278
async function getSkillById (skillId) {
12791279
const token = await getM2MUbahnToken()
12801280
const res = await request
1281-
.get(`${config.TC_API}/skills/${skillId}`)
1281+
.get(`${config.TC_BETA_API}/skills/${skillId}`)
12821282
.set('Authorization', `Bearer ${token}`)
12831283
.set('Content-Type', 'application/json')
12841284
.set('Accept', 'application/json')

0 commit comments

Comments
 (0)