mirror of
https://github.com/reality/dbot.git
synced 2024-11-23 12:29:26 +01:00
extract err
This commit is contained in:
parent
323be545ab
commit
a2ea8cd260
@ -52,7 +52,7 @@ var api = function(dbot) {
|
||||
args[callbackIndex] = function() {
|
||||
body.data = Array.prototype.slice.call(arguments, 0);
|
||||
if(_.isObject(body.data[0]) && _.has(body.data[0], 'err')) {
|
||||
body.err = body.data.err;
|
||||
body.err = body.data[0].err;
|
||||
}
|
||||
res.json(body);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user