Skip to content

Commit

Permalink
fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
fcaps committed Nov 22, 2023
1 parent 9cb66de commit 4ce027a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fafApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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)
Expand All @@ -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)

Expand All @@ -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)
}

0 comments on commit 4ce027a

Please sign in to comment.