Skip to content

Commit

Permalink
Add route alternative for search
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrantejake committed Apr 11, 2017
1 parent 093dcb9 commit 3b26ea9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/endpoints/search.js
Expand Up @@ -9,10 +9,10 @@ Search.prototype.all = function(params, callback) {
this.executeRequest(this.genEndpoint, params, callback);
}

Search.prototype.beers = function(params, callback) {
Search.prototype.beers = function(route, params, callback) {
params.key = this.config.key;
params.type = "beer";
this.executeRequest(this.genEndpoint, params, callback);
this.executeRequest(`${this.genEndpoint}${route ? `/${route}` : ``}`, params, callback);
}

Search.prototype.breweries = function(params, callback) {
Expand Down

0 comments on commit 3b26ea9

Please sign in to comment.