Skip to content

Commit

Permalink
Fix #64 (#65)
Browse files Browse the repository at this point in the history
Adds the response object to the success condition callback
  • Loading branch information
demoore authored Dec 12, 2022
1 parent 0fbcdf0 commit 529c478
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/sendwithus.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Sendwithus.prototype._handleResponse = function (result, response, callback) {
this.emit("response", response.status, result, response);
this._debug(`Response ${response.status}: ` + JSON.stringify(result));
if (typeof callback == "function") {
callback(null, result);
callback(null, result, response);
}
}
// handle anything which is an error outside of the instaceof Error type
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": "sendwithus",
"version": "6.0.1",
"version": "6.0.2",
"author": "Sendwithus <[email protected]>",
"description": "Sendwithus.com Node.js client",
"main": "index.js",
Expand Down

0 comments on commit 529c478

Please sign in to comment.