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 733fa06 commit 2532a4eCopy full SHA for 2532a4e
src/app/collections/route.ts
@@ -3,11 +3,12 @@ import { NextRequest, NextResponse } from "next/server"
3
4
export const runtime = "edge"
5
6
-export async function GET(
7
- request: NextRequest,
8
- { params }: { params: Record<string, any> }
9
-) {
10
- const { handle, pageParam, limit, cart_id } = params
+export async function GET(request: NextRequest) {
+ const searchParams = request.nextUrl.searchParams
+ const handle = searchParams.get("handle") ?? ""
+ const pageParam = searchParams.get("pageParam") ?? "0"
+ const limit = searchParams.get("limit") ?? "12"
11
+ const cart_id = searchParams.get("cart_id") ?? ""
12
13
const collection = await fetchCollection(handle)
14
.then((res) => res)
0 commit comments