Skip to content

Commit

Permalink
chore: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRivers committed May 9, 2024
1 parent 51e9adb commit 9a07f0f
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 65 deletions.
106 changes: 48 additions & 58 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@types/express-session": "^1.17.10",
"@types/jest": "^29.5.11",
"@types/node": "^20.10.5",
"@types/supertest": "^2.0.16",
"@types/supertest": "^6.0.2",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"eslint": "^8.55.0",
Expand All @@ -58,7 +58,7 @@
"jest": "^29.7.0",
"lint-staged": "^15.2.0",
"nodemon": "^2.0.15",
"prettier": "^3.1.0",
"prettier": "^3.2.5",
"supertest": "^7.0.0",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.2",
Expand Down
9 changes: 4 additions & 5 deletions src/setup/sessionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const SESSION_MAX_AGE: number = 1000 * 60 * 60 * 24;
const sessionConfig: SessionOptions = {
secret: randomString(),
saveUninitialized: true,
cookie: {
cookie: {
maxAge: SESSION_MAX_AGE,
sameSite: 'lax',
httpOnly: true,
Expand Down Expand Up @@ -44,12 +44,11 @@ const getSessionManager = (): ExpressMiddleware<void> => {

const hasSessionMiddleware = (app: Express) => {
if (app._router && app._router.stack) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return app._router.stack.some((l: any) => l.name === 'session')
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return app._router.stack.some((l: any) => l.name === 'session');
}
return false;
}

};

/**
* Attaches the `express-session` middleware and the `SessionManager` for internal
Expand Down

0 comments on commit 9a07f0f

Please sign in to comment.