Request fix
CI / ci (push) Canceled after 0s

- Auth.js handlers require NextRequest.
- The wrapper accepted plain Request.
Changed both GET and POST handlers to accept NextRequest.
This commit is contained in:
Stefan Lazic committed 2026-09-04 21:59:44 +01:00
1 parent bc45608023
commit d9a253a974
3 files changed
+7 -4

No files matched your search

+4 -2
View File
@@ -1,3 +1,5 @@
import { NextRequest } from "next/server";
/**
* Business Auth.js is intentionally unavailable in the standalone Manager
* deployment. Keeping this check before the dynamic import prevents a stale
@@ -7,13 +9,13 @@ function managerAuthDisabled() {
return process.env.MANAGER_MODE === "true";
}
export async function GET(request: Request) {
export async function GET(request: NextRequest) {
if (managerAuthDisabled()) return new Response(null, { status: 404 });
const { handlers } = await import("@/auth");
return handlers.GET(request);
}
export async function POST(request: Request) {
export async function POST(request: NextRequest) {
if (managerAuthDisabled()) return new Response(null, { status: 404 });
const { handlers } = await import("@/auth");
return handlers.POST(request);