mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-31 17:56:21 +02:00
💳 Support payments with Stripe (#822)
This commit is contained in:
parent
969ae35971
commit
6f425edeaa
20 changed files with 712 additions and 229 deletions
|
@ -1,8 +1,11 @@
|
|||
import type { IncomingMessage, ServerResponse } from "http";
|
||||
import { getIronSession } from "iron-session/edge";
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
import { sessionConfig } from "../session-config";
|
||||
|
||||
export const getSession = async (req: NextRequest, res: NextResponse) => {
|
||||
export const getSession = async (
|
||||
req: Request | IncomingMessage,
|
||||
res: Response | ServerResponse,
|
||||
) => {
|
||||
return getIronSession(req, res, sessionConfig);
|
||||
};
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import type { IncomingMessage, ServerResponse } from "http";
|
||||
import { getIronSession } from "iron-session";
|
||||
import { withIronSessionApiRoute, withIronSessionSsr } from "iron-session/next";
|
||||
import {
|
||||
GetServerSideProps,
|
||||
|
@ -13,6 +15,13 @@ export function withSessionRoute(handler: NextApiHandler) {
|
|||
return withIronSessionApiRoute(handler, sessionConfig);
|
||||
}
|
||||
|
||||
export const getSession = async (
|
||||
req: Request | IncomingMessage,
|
||||
res: Response | ServerResponse,
|
||||
) => {
|
||||
return getIronSession(req, res, sessionConfig);
|
||||
};
|
||||
|
||||
export function withSessionSsr(
|
||||
handler: GetServerSideProps | GetServerSideProps[],
|
||||
options?: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue