Skip to content

Commit

Permalink
remove auth for get skills endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Aranyajit committed Feb 5, 2024
1 parent 4f4f849 commit dfe998e
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 dfe998e

Please sign in to comment.