Skip to content

Commit 2532a4e

Browse files
committed
Revert "refactor: collections route"
This reverts commit 733fa06.
1 parent 733fa06 commit 2532a4e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/app/collections/route.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ import { NextRequest, NextResponse } from "next/server"
33

44
export const runtime = "edge"
55

6-
export async function GET(
7-
request: NextRequest,
8-
{ params }: { params: Record<string, any> }
9-
) {
10-
const { handle, pageParam, limit, cart_id } = params
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") ?? ""
1112

1213
const collection = await fetchCollection(handle)
1314
.then((res) => res)

0 commit comments

Comments
 (0)