mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
wip api-v3: add error handler middleware and custom error classes
This commit is contained in:
@@ -104,6 +104,9 @@ if (cores!==0 && cluster.isMaster && (isDev || isProd)) {
|
||||
// Matches all requests going to /api/v3
|
||||
app.all('/api/v3', newApp);
|
||||
|
||||
// Mount middlewares for the new app
|
||||
require('./middlewares/api-v3/index')(newApp);
|
||||
|
||||
//require('./middlewares/apiThrottle')(oldApp);
|
||||
oldApp.use(require('./middlewares/domain')(server,mongoose));
|
||||
if (!isProd && !DISABLE_LOGGING) oldApp.use(require('morgan')("dev"));
|
||||
|
||||
Reference in New Issue
Block a user