refactor: remove unneeded return statement
This commit is contained in:
parent
87c3bbceee
commit
5432f3df1c
1 changed files with 18 additions and 19 deletions
|
|
@ -9,24 +9,23 @@ const { getOperatorId } = require('../../operator')
|
||||||
|
|
||||||
const hostname = options.hostname
|
const hostname = options.hostname
|
||||||
|
|
||||||
router.use('*', async (req, res, next) => {
|
router.use('*', async (req, res, next) => getOperatorId('authentication').then(({ operatorId }) => session({
|
||||||
return getOperatorId('authentication').then(({ operatorId }) => session({
|
store: new PgSession({
|
||||||
store: new PgSession({
|
pgPromise: db,
|
||||||
pgPromise: db,
|
tableName: USER_SESSIONS_TABLE_NAME
|
||||||
tableName: USER_SESSIONS_TABLE_NAME
|
}),
|
||||||
}),
|
name: 'lamassu_sid',
|
||||||
name: 'lamassu_sid',
|
secret: operatorId,
|
||||||
secret: operatorId,
|
resave: false,
|
||||||
resave: false,
|
saveUninitialized: false,
|
||||||
saveUninitialized: false,
|
cookie: {
|
||||||
cookie: {
|
httpOnly: true,
|
||||||
httpOnly: true,
|
secure: true,
|
||||||
secure: true,
|
domain: hostname,
|
||||||
domain: hostname,
|
sameSite: true,
|
||||||
sameSite: true,
|
maxAge: 60 * 10 * 1000 // 10 minutes
|
||||||
maxAge: 60 * 10 * 1000 // 10 minutes
|
}
|
||||||
}
|
})(req, res, next))
|
||||||
})(req, res, next))
|
)
|
||||||
})
|
|
||||||
|
|
||||||
module.exports = router
|
module.exports = router
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue