feat(query-params): proper handling in case of invalid credentials
This commit is contained in:
committed by
Benedikt Rötsch
parent
ff305e7d34
commit
46074b508d
@@ -12,6 +12,15 @@ const { getSettings, postSettings } = require('./settings')
|
||||
const { getLandingPage } = require('./landingPage')
|
||||
const { getImprint } = require('./imprint')
|
||||
|
||||
// Display settings in case of invalid credentials
|
||||
router.all('*', async (request, response, next) => {
|
||||
if (response.locals.forceSettingsRoute) {
|
||||
await getSettings(request, response, next)
|
||||
return
|
||||
}
|
||||
next()
|
||||
})
|
||||
|
||||
// GET the home landing page
|
||||
router.get('/', catchErrors(getLandingPage))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user