18 lines
366 B
TypeScript
18 lines
366 B
TypeScript
import { getAuth } from "@/lib/auth";
|
|
import { NextRequest } from "next/server";
|
|
|
|
export const runtime = "nodejs";
|
|
|
|
async function handler(req: NextRequest) {
|
|
const auth = await getAuth();
|
|
return auth.handler(req);
|
|
}
|
|
|
|
export async function POST(req: NextRequest) {
|
|
return handler(req);
|
|
}
|
|
|
|
export async function GET(req: NextRequest) {
|
|
return handler(req);
|
|
}
|