mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-19 11:39:36 +02:00
Split apps controllers into separate files
This commit is contained in:
parent
b7de1e3d27
commit
34279c8b8c
16 changed files with 444 additions and 398 deletions
|
@ -14,10 +14,14 @@ const errorHandler = (err, req, res, next) => {
|
|||
|
||||
logger.log(error.message.split(',')[0], 'ERROR');
|
||||
|
||||
if (process.env.NODE_ENV == 'development') {
|
||||
console.log(err);
|
||||
}
|
||||
|
||||
res.status(err.statusCode || 500).json({
|
||||
success: false,
|
||||
error: error.message || 'Server Error'
|
||||
})
|
||||
}
|
||||
error: error.message || 'Server Error',
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = errorHandler;
|
||||
module.exports = errorHandler;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue