refactor: remove unneeded return statement

This commit is contained in:
José Oliveira 2021-11-22 20:28:09 +00:00
parent 87c3bbceee
commit 5432f3df1c

View file

@ -9,24 +9,23 @@ const { getOperatorId } = require('../../operator')
const hostname = options.hostname
router.use('*', async (req, res, next) => {
return getOperatorId('authentication').then(({ operatorId }) => session({
store: new PgSession({
pgPromise: db,
tableName: USER_SESSIONS_TABLE_NAME
}),
name: 'lamassu_sid',
secret: operatorId,
resave: false,
saveUninitialized: false,
cookie: {
httpOnly: true,
secure: true,
domain: hostname,
sameSite: true,
maxAge: 60 * 10 * 1000 // 10 minutes
}
})(req, res, next))
})
router.use('*', async (req, res, next) => getOperatorId('authentication').then(({ operatorId }) => session({
store: new PgSession({
pgPromise: db,
tableName: USER_SESSIONS_TABLE_NAME
}),
name: 'lamassu_sid',
secret: operatorId,
resave: false,
saveUninitialized: false,
cookie: {
httpOnly: true,
secure: true,
domain: hostname,
sameSite: true,
maxAge: 60 * 10 * 1000 // 10 minutes
}
})(req, res, next))
)
module.exports = router