- Auth.js handlers require NextRequest. - The wrapper accepted plain Request. Changed both GET and POST handlers to accept NextRequest.
This commit is contained in:
3 files changed
+7
-4
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { NextRequest } from "next/server";
|
||||
|
||||
// The Manager must not load the business Auth.js module even if a stale
|
||||
// client requests `/api/auth/session`.
|
||||
@@ -19,7 +20,7 @@ describe("Manager business-auth boundary", () => {
|
||||
it("returns 404 without importing business Auth.js", async () => {
|
||||
process.env.MANAGER_MODE = "true";
|
||||
|
||||
const response = await GET(new Request("https://manager.example.com/api/auth/session"));
|
||||
const response = await GET(new NextRequest("https://manager.example.com/api/auth/session"));
|
||||
|
||||
expect(response.status).toBe(404);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user