🐛 Fix broken checkout and portal

This commit is contained in:
Luke Vella 2023-10-20 12:10:34 +01:00
parent 703d551aac
commit 502f2a7a43
4 changed files with 6 additions and 24 deletions

View file

@ -1,2 +1 @@
export * from "./session";
export * from "./utils";

View file

@ -1,17 +0,0 @@
import type { IncomingMessage, ServerResponse } from "http";
import { getIronSession } from "iron-session";
import { withIronSessionApiRoute } from "iron-session/next";
import { NextApiHandler } from "next";
import { sessionConfig } from "../session-config";
export function withSessionRoute(handler: NextApiHandler) {
return withIronSessionApiRoute(handler, sessionConfig);
}
export const getSession = async (
req: Request | IncomingMessage,
res: Response | ServerResponse,
) => {
return getIronSession(req, res, sessionConfig);
};