// Neon Auth API route — handles all auth endpoints via Better Auth server proxy.
// Mounted at /api/auth/* (sign-in, sign-out, session, callbacks, etc.)
import { NextRequest } from "next/server";
import { handlersGET, handlersPOST } from "@/lib/auth";

// Re-export as GET and POST for Next.js route handler
export const GET = async (req: NextRequest, ctx: { params: Promise<{ nextauth: string[] }> }) => {
  return handlersGET(req as unknown as Request, ctx as unknown as { params: Promise<{ path: string[] }> });
};

export const POST = async (req: NextRequest, ctx: { params: Promise<{ nextauth: string[] }> }) => {
  return handlersPOST(req as unknown as Request, ctx as unknown as { params: Promise<{ path: string[] }> });
};
