Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
app.use(function (err, req, res, next){
console.log(err.stack);
res.status(err.status || 500);
res.render('error', {
message: err.message,
error: err,
helpers: handlebars.helpers
});
});
}
app.use((err, req, res, next) => {
console.error(colors.red(err.stack));
res.status(err.status || 500);
res.render('error', {
message: err.message,
error: {},
helpers: handlebars.helpers
});
});
app.use((err, req, res, next) => {
console.error(err.stack);
res.status(err.status || 500);
res.render('error', {
message: err.message,
error: {},
helpers: handlebars.helpers,
config: config
});
});
app.use(function (err, req, res, next){
console.log(err.stack);
res.status(err.status || 500);
res.render('error', {
message: err.message,
error: {},
helpers: handlebars.helpers
});
});
app.use((req, res, next) => {
req.markdownit = markdownit;
req.handlebars = handlebars.helpers;
req.bcrypt = bcrypt;
req.i18n = i18n;
req.app_context = app_context;
req.i18n.setLocaleFromCookie();
next();
});
amountNoDecimal: (amt) => {
if(amt){
return handlebars.helpers.formatAmount(amt).replace('.', '');
}
return handlebars.helpers.formatAmount(amt);
},
getStatusColor: (status) => {