bartve / disconnect

An easy to use Node.js client with OAuth support to connect with the discogs.com API v2.0
MIT License
458 stars 79 forks source link

database.search not working when query is ommited and params object is passed #38

Closed pedro-otero closed 7 years ago

pedro-otero commented 7 years ago

I came across this issue when trying to perform this search:

/database/search?artist=Lana Del Rey&title=Honeymoon&type=master

There is no query parameter. This search runs ok with an http client returning 2 results. So I invoke the search function like this:

db.search({artist: 'Lana Del Rey', title: 'Honeymoon', type: 'master'})

And disconnect ignores my params object altogether. In the response I get pagination.urls.last is https://api.discogs.com/database/search?q=&per_page=50&page=1000.

bartve commented 7 years ago

Thanks for reporting and fixing! Will take a look at this next Thursday, I'll have some time then.

bartve commented 7 years ago

Oops, will merge next week. Busy times.