Skip to content

Commit 6d0083f

Browse files
DaveyBrownpajaydev
authored andcommitted
Don't encode filter= (#48)
The query string for the buy api should not encode the = symbol. The `filter=` part of the query string has been removed outside of the `encodeURLQuery` function.
1 parent 2d6953f commit 6d0083f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/buy-api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const searchItems = function (searchConfig) {
5555
queryParam = queryParam + (searchConfig.offset ? '&offset=' + searchConfig.offset : '');
5656
queryParam = queryParam + (searchConfig.sort ? '&sort=' + searchConfig.sort : '');
5757
if (searchConfig.fieldgroups !== undefined) queryParam = queryParam + '&fieldgroups=' + searchConfig.fieldgroups;
58-
if (searchConfig.filter !== undefined) queryParam = queryParam + '&' + encodeURLQuery('filter=' + makeString(searchConfig.filter, { quotes: 'no', braces: 'false' }));
58+
if (searchConfig.filter !== undefined) queryParam = queryParam + '&filter=' + encodeURLQuery(makeString(searchConfig.filter, { quotes: 'no', braces: 'false' }));
5959
console.log(this.options.baseUrl + `/buy/browse/v1/item_summary/search?${(queryParam)}`);
6060
//this.options.baseUrl, `/buy/browse/v1/item_summary/search?${encodeURI(queryParam)}
6161
return new Promise((resolve, reject) => {

0 commit comments

Comments
 (0)