Closed elie222 closed 4 months ago
+1 on this. Is there an upgrade guide?
in my cases,
export default withIronSessionApiRoute(
async function handler (
req: NextApiRequest,
res: NextApiResponse,
) {
...
}, IronSessionOptions)
export default async function handler (
req: NextApiRequest,
res: NextApiResponse,
) {
const session = await getIronSession<ApiResonseData>(req, res, IronSessionOptions)
...
}
Here's the OG source code: https://github.com/vvo/iron-session/blob/v6/next/index.ts
Yep this is how it was done previously: https://github.com/vvo/iron-session/blob/70d2ff14aacb51e83284d51832fdcda539b4dabc/next/index.ts#L19-L46
Upgrading from v6 to v8 of this package. What's the easiest way to migrate
withIronSessionApiRoute
?