Skip to content

Commit fb2d6af

Browse files
author
bountyCoder
committed
removed axios package
1 parent b6158fc commit fb2d6af

File tree

3 files changed

+4
-36
lines changed

3 files changed

+4
-36
lines changed

package-lock.json

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

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"standard": "^12.0.1"
2222
},
2323
"dependencies": {
24-
"axios": "^0.27.2",
2524
"bluebird": "^3.5.1",
2625
"config": "^3.0.1",
2726
"get-parameter-names": "^0.3.0",

src/common/helper.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*/
44

55
const _ = require('lodash')
6-
const axios = require('axios')
76
const config = require('config')
87
const m2mAuth = require('tc-core-library-js').auth.m2m
98
const m2m = m2mAuth(_.pick(config, ['AUTH0_URL', 'AUTH0_AUDIENCE', 'TOKEN_CACHE_TIME', 'AUTH0_PROXY_SERVER_URL']))
@@ -220,14 +219,10 @@ async function memberGroupsCall (groupId, memberId) {
220219
const url = `${config.GROUPS_API_URL}/${groupId}/members/${memberId}`
221220

222221
try {
223-
const res = await axios
224-
.get(url, {
225-
headers: {
226-
'Authorization': `Bearer ${token}`
227-
}
228-
})
229-
230-
return res
222+
return superagent
223+
.get(url)
224+
.set('Authorization', `Bearer ${token}`)
225+
.timeout(config.REQUEST_TIMEOUT)
231226
} catch (error) {
232227
return []
233228
}

0 commit comments

Comments
 (0)