We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8144bc commit 5e6ba37Copy full SHA for 5e6ba37
src/common/helper.js
@@ -4,7 +4,6 @@
4
const Joi = require('joi')
5
const _ = require('lodash')
6
const querystring = require('querystring')
7
-const request = require('superagent')
8
const constants = require('../../app-constants')
9
const models = require('../models')
10
const errors = require('./errors')
@@ -341,10 +340,10 @@ async function validatePhases (phases) {
341
340
* @return {Promise} promise resolved to downloaded data
342
*/
343
async function downloadFromFileStack (url) {
344
- const res = await request.get(url)
+ const res = await axios.get(url)
345
return {
346
- data: res.body,
347
- mimetype: res.type
+ data: res.data,
+ mimetype: _.get(res, `headers['content-type']`, 'application/json')
348
}
349
350
0 commit comments