Skip to content

Commit 529c478

Browse files
authored
Fix #64 (#65)
Adds the response object to the success condition callback
1 parent 0fbcdf0 commit 529c478

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/sendwithus.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Sendwithus.prototype._handleResponse = function (result, response, callback) {
123123
this.emit("response", response.status, result, response);
124124
this._debug(`Response ${response.status}: ` + JSON.stringify(result));
125125
if (typeof callback == "function") {
126-
callback(null, result);
126+
callback(null, result, response);
127127
}
128128
}
129129
// handle anything which is an error outside of the instaceof Error type

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sendwithus",
3-
"version": "6.0.1",
3+
"version": "6.0.2",
44
"author": "Sendwithus <[email protected]>",
55
"description": "Sendwithus.com Node.js client",
66
"main": "index.js",

0 commit comments

Comments
 (0)