Skip to content

Commit

Permalink
fix: replace improved query string lib
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubMatejka committed May 17, 2019
1 parent 1a07d8b commit ded68ba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"csv-string": "^3.1.2",
"http-errors": "^1.7.0",
"lodash": "^4.17.10",
"querystring": "^0.2.0",
"qs": "^6.7.0",
"sleep-promise": "^8.0.1"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions src/Configurations.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow
import _ from 'lodash';
import QueryString from 'querystring';
import qs from 'qs';
import Storage from './Storage';

export default class Configurations {
Expand Down Expand Up @@ -61,7 +61,7 @@ export default class Configurations {
}
let uri = 'components';
if (_.size(params)) {
uri += `?${QueryString.stringify(params)}`;
uri += `?${qs.stringify(params)}`;
}

return this.storage.request('get', uri);
Expand All @@ -74,7 +74,7 @@ export default class Configurations {
}
let uri = `components/${component}/configs`;
if (_.size(params)) {
uri += `?${QueryString.stringify(params)}`;
uri += `?${qs.stringify(params)}`;
}
return this.storage.request('get', uri);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import _ from 'lodash';
import axios from 'axios';
import axiosRetry from 'axios-retry';
import createError from 'http-errors';
import QueryString from 'querystring';
import qs from 'qs';

import Buckets from './Buckets';
import Configurations from './Configurations';
Expand Down Expand Up @@ -44,7 +44,7 @@ export default class Storage {
method,
url,
headers: { 'X-StorageApi-Token': this.token },
data: data ? QueryString.stringify(data) : null,
data: data ? qs.stringify(data) : null,
};
try {
const res = await axios(params);
Expand Down

0 comments on commit ded68ba

Please sign in to comment.