extract err

This commit is contained in:
reality 2015-03-15 18:52:33 +00:00
parent 323be545ab
commit a2ea8cd260

View File

@ -52,7 +52,7 @@ var api = function(dbot) {
args[callbackIndex] = function() { args[callbackIndex] = function() {
body.data = Array.prototype.slice.call(arguments, 0); body.data = Array.prototype.slice.call(arguments, 0);
if(_.isObject(body.data[0]) && _.has(body.data[0], 'err')) { if(_.isObject(body.data[0]) && _.has(body.data[0], 'err')) {
body.err = body.data.err; body.err = body.data[0].err;
} }
res.json(body); res.json(body);
}; };