ngin_client
Advanced tools
Comparing version 0.1.27 to 0.1.28
@@ -34,3 +34,3 @@ "use strict" | ||
this.sync('read', options, function(err, data, resp) { | ||
if (err) return callback(err) | ||
if (err) return callback(err, data, resp) | ||
data = self.parse(data, resp) | ||
@@ -52,3 +52,3 @@ _.extend(self, data) | ||
this.sync(method, options, function(err, data, resp) { | ||
if (err) return callback(err) | ||
if (err) return callback(err, data, resp) | ||
data = self.parse(data, resp) | ||
@@ -127,3 +127,3 @@ _.extend(self, data) | ||
inst.fetch(options, function(err, data, resp) { | ||
callback && callback(err, inst) | ||
callback && callback(err, inst, data, resp) | ||
}) | ||
@@ -147,3 +147,3 @@ } | ||
this.sync('read', null, options, function(err, data, resp) { | ||
if (err) return callback(err) | ||
if (err) return callback(err, data, resp) | ||
data = self.parseList(data, resp) | ||
@@ -150,0 +150,0 @@ var list = [] |
{ | ||
"name": "ngin_client", | ||
"version": "0.1.27", | ||
"version": "0.1.28", | ||
"description": "Node client for interacting with the NGIN API services", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -69,7 +69,7 @@ "use strict" | ||
tiebreakPreference: function(callback){ | ||
return ngin.TiebreakPreference.list({flight_id: this.id}, function(err, list, opts) { | ||
return ngin.TiebreakPreference.list({flight_id: this.id}, function(err, list, resp) { | ||
if (Array.isArray(list) && !err ) { | ||
return callback(err, list[0], opts) | ||
return callback(err, list[0], resp) | ||
} | ||
callback(err, null, opts) | ||
callback(err, null, resp) | ||
}) | ||
@@ -76,0 +76,0 @@ }, |
@@ -71,3 +71,3 @@ "use strict" | ||
function(err, res, body) { | ||
if (err) return callback(err) | ||
if (err) return callback(err, null, res) | ||
var data | ||
@@ -80,3 +80,3 @@ try { | ||
} | ||
callback(err, data) | ||
callback(err, data, res) | ||
}) | ||
@@ -83,0 +83,0 @@ }, |
44938
39
1425