3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 06:19:24 +01:00

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() {
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);
};