diff --git a/fafApp.js b/fafApp.js index a338edd0..f26459f8 100644 --- a/fafApp.js +++ b/fafApp.js @@ -13,6 +13,7 @@ const newsRouter = require("./routes/views/news") const leaderboardRouter = require("./routes/views/leaderboardRouter") const clanRouter = require("./routes/views/clanRouter") const accountRouter = require("./routes/views/accountRouter") +const dataRouter = require('./routes/views/dataRouter'); const setupCronJobs = require("./scripts/cron-jobs") const copyFlashHandler = (req, res, next) => { @@ -50,6 +51,7 @@ module.exports.loadRouters = (app) => { app.use('/leaderboards', leaderboardRouter) app.use('/clans', clanRouter) app.use('/account', accountRouter) + app.use('/data', dataRouter) app.use(notFoundHandler) app.use(errorHandler) @@ -62,6 +64,7 @@ module.exports.setup = (app) => { app.set('view engine', 'pug') app.set('port', appConfig.expressPort) + app.use(middleware.injectServices) app.use(middleware.initLocals) app.use(middleware.clientChecks) @@ -88,6 +91,5 @@ module.exports.setup = (app) => { app.use(passport.session()) app.use(flash()) app.use(middleware.username) - app.use(middleware.flashMessage) app.use(copyFlashHandler) }