Skip to content

Commit 7a9ef5f

Browse files
authored
chore: Sync e2e with AWS (#943)
1 parent f73ac0f commit 7a9ef5f

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { NextResponse } from "next/server";
2+
3+
export async function GET(_req: Request, { params }: { params: Promise<{ "better-auth": string[] }> }) {
4+
const { "better-auth": slugs } = await params;
5+
6+
return NextResponse.json({
7+
slugs,
8+
});
9+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { expect, test } from "@playwright/test";
2+
3+
// https://github.com/opennextjs/opennextjs-cloudflare/issues/942
4+
test("Dynamic catch-all API route with hyphen param", async ({ request }) => {
5+
const res = await request.get("/api/auth/opennext/is/really/cool");
6+
expect(res.status()).toBe(200);
7+
expect(res.headers()["content-type"]).toBe("application/json");
8+
const json = await res.json();
9+
expect(json).toStrictEqual({ slugs: ["opennext", "is", "really", "cool"] });
10+
});

0 commit comments

Comments
 (0)