fix: async function arguments

This commit is contained in:
José Oliveira 2021-11-22 20:25:02 +00:00
parent 3c38dacdc7
commit 87c3bbceee

View file

@ -9,7 +9,7 @@ const { getOperatorId } = require('../../operator')
const hostname = options.hostname
router.use('*', async () => {
router.use('*', async (req, res, next) => {
return getOperatorId('authentication').then(({ operatorId }) => session({
store: new PgSession({
pgPromise: db,
@ -26,7 +26,7 @@ router.use('*', async () => {
sameSite: true,
maxAge: 60 * 10 * 1000 // 10 minutes
}
}))
})(req, res, next))
})
module.exports = router