chore: server code formatting
This commit is contained in:
parent
aedabcbdee
commit
68517170e2
234 changed files with 9824 additions and 6195 deletions
|
|
@ -6,21 +6,24 @@ const db = require('../../db')
|
|||
const { USER_SESSIONS_TABLE_NAME } = require('../../constants')
|
||||
const { getOperatorId } = require('../../operator')
|
||||
|
||||
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,
|
||||
sameSite: true
|
||||
}
|
||||
})(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,
|
||||
sameSite: true,
|
||||
},
|
||||
})(req, res, next),
|
||||
),
|
||||
)
|
||||
|
||||
module.exports = router
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue