Skip to content

Commit

Permalink
Merge pull request #721 from topcoder-platform/dev
Browse files Browse the repository at this point in the history
[PROD] TSJR-365
  • Loading branch information
kkartunov authored Feb 7, 2024
2 parents 03c8eda + 9efb6ab commit dd666db
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/common/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -592,14 +592,12 @@ async function getAllTopcoderSkills (criteria) {
* @returns the request result
*/
async function getSkillById (skillId) {
const token = await getM2MToken()
localLogger.debug({
context: 'getSkillById',
message: `M2M Token: ${token}`
message: `skillId: ${skillId}`
})
const res = await request
.get(`${config.TC_API}/standardized-skills/skills/${skillId}`)
.set('Authorization', `Bearer ${token}`)
.set('Content-Type', 'application/json')
.set('Accept', 'application/json')
localLogger.debug({
Expand All @@ -621,16 +619,14 @@ async function getSkillsByExactNames (names) {
return []
}

const token = await getM2MToken()
localLogger.debug({
context: 'getSkillsByNames',
message: `M2M Token: ${token}`
message: `skill names: ${names}`
})

const url = `${config.TC_API}/standardized-skills/skills?${names.map(skill => `name=${encodeURIComponent(skill)}`).join('&')}`
const res = await request
.get(url)
.set('Authorization', `Bearer ${token}`)
.set('Content-Type', 'application/json')
.set('Accept', 'application/json')

Expand Down

0 comments on commit dd666db

Please sign in to comment.