Merge pull request #2512 from colegleason/version-error
chore(VersionError): add debug code to emails showing completed ops
This commit is contained in:
@@ -437,10 +437,12 @@ api.batchUpdate = function(req, res, next) {
|
||||
api[_req.op](_req, res);
|
||||
};
|
||||
|
||||
res.locals.ops = [];
|
||||
// Setup the array of functions we're going to call in parallel with async
|
||||
var ops = _.transform(req.body, function(result, _req) {
|
||||
if (!_.isEmpty(_req)) {
|
||||
result.push(function(cb) {
|
||||
res.locals.ops.push(_req);
|
||||
callOp(_req, cb);
|
||||
});
|
||||
}
|
||||
|
||||
+2
-1
@@ -66,7 +66,8 @@ module.exports.errorHandler = function(err, req, res, next) {
|
||||
"\n\noriginalUrl: " + req.originalUrl +
|
||||
"\n\nauth: " + req.headers['x-api-user'] + ' | ' + req.headers['x-api-key'] +
|
||||
"\n\nheaders: " + JSON.stringify(req.headers) +
|
||||
"\n\nbody: " + JSON.stringify(req.body);
|
||||
"\n\nbody: " + JSON.stringify(req.body) +
|
||||
(res.locals.ops ? "\n\ncompleted ops: " + JSON.stringify(res.locals.ops) : "");
|
||||
module.exports.sendEmail({
|
||||
from: "HabitRPG <" + nconf.get('SMTP_USER') + ">",
|
||||
to: nconf.get('ADMIN_EMAIL') || nconf.get('SMTP_USER'),
|
||||
|
||||
Reference in New Issue
Block a user