fix type warning in session

This commit is contained in:
Thomas Ruoff
2020-10-28 23:33:29 +01:00
parent ae8ed9912a
commit 9b3ea665f9

View File

@@ -1,9 +1,9 @@
import { withIronSession } from 'next-iron-session' import { withIronSession, Handler } from 'next-iron-session'
const SESSION_SECRET = const SESSION_SECRET =
process.env.SESSION_SECRET || 'dev-env-default-secret-991823723' process.env.SESSION_SECRET || 'dev-env-default-secret-991823723'
export default function withSession(handler) { export default function withSession(handler: Handler) {
return withIronSession(handler, { return withIronSession(handler, {
password: SESSION_SECRET, password: SESSION_SECRET,
cookieName: 'pfadi-bussle-cookie', cookieName: 'pfadi-bussle-cookie',