From a2ea8cd260eba2094b976cc936bfe50802abe36c Mon Sep 17 00:00:00 2001 From: reality Date: Sun, 15 Mar 2015 18:52:33 +0000 Subject: [PATCH] extract err --- modules/api/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/api/api.js b/modules/api/api.js index 58b1767..15b46dc 100644 --- a/modules/api/api.js +++ b/modules/api/api.js @@ -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); };