We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 737fdc0 commit 733fa06Copy full SHA for 733fa06
src/app/collections/route.ts
@@ -3,12 +3,11 @@ import { NextRequest, NextResponse } from "next/server"
3
4
export const runtime = "edge"
5
6
-export async function GET(request: NextRequest) {
7
- const searchParams = request.nextUrl.searchParams
8
- const handle = searchParams.get("handle") ?? ""
9
- const pageParam = searchParams.get("pageParam") ?? "0"
10
- const limit = searchParams.get("limit") ?? "12"
11
- const cart_id = searchParams.get("cart_id") ?? ""
+export async function GET(
+ request: NextRequest,
+ { params }: { params: Record<string, any> }
+) {
+ const { handle, pageParam, limit, cart_id } = params
12
13
const collection = await fetchCollection(handle)
14
.then((res) => res)
0 commit comments