Skip to content

Commit

Permalink
Merge pull request #34 from chyipin/fix_get_all
Browse files Browse the repository at this point in the history
Fix getAll params
  • Loading branch information
andrewkarell authored Dec 16, 2016
2 parents ec2d987 + 512b737 commit cc9b85e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions lib/Pipedrive.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,6 @@ THE SOFTWARE.
params = {};
}

params = _.extend({}, params, {
start: start,
limit: perPage
});

var collection = [],
self = this,
page = 0,
Expand All @@ -197,7 +192,11 @@ THE SOFTWARE.
if (!self[resource]) {
throw new Error(resource+' is not supported object type for getAll()');
}
self[resource].getAll(params, function(err, models) {
var pageParams = _.extend({}, params, {
start: start,
limit: perPage
});
self[resource].getAll(pageParams, function(err, models) {
if (err) {
return callback(err);
} else {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pipedrive",
"version": "2.1.3",
"version": "2.1.4",
"description": "Pipedrive REST client for NodeJS",
"keywords": [
"pipedrive",
Expand Down

0 comments on commit cc9b85e

Please sign in to comment.