-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/dr 4029/facet filters #537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
15f7b8e
c6d8bdc
aaae508
c4fcbb9
07bcad3
15f15ee
f2718b0
8b55033
bd390a1
809eb4b
c7bd976
8440a1e
4d92505
e69b67a
4057f65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import { NextRequest, NextResponse } from "next/server"; | ||
| import { CollectionsApi } from "@/src/utils/apiClients/apiClients"; | ||
|
|
||
| export const GET = async ( | ||
| request: NextRequest, | ||
| { params }: { params: { facet: string } } | ||
| ) => { | ||
| const searchParams = request.nextUrl.searchParams; | ||
| const q = searchParams.get("q") || ""; | ||
| const filters = searchParams.get("filters") || ""; | ||
| try { | ||
| const response = await CollectionsApi.getFacetOptions( | ||
| params.facet, | ||
| q, | ||
| filters | ||
| ); | ||
| return NextResponse.json(response, { status: 200 }); | ||
| } catch (error: any) { | ||
| return NextResponse.json( | ||
| { error: error?.message || "Unknown error" }, | ||
| { status: 500 } | ||
| ); | ||
| } | ||
|
Comment on lines
+4
to
+23
|
||
| }; | ||
Uh oh!
There was an error while loading. Please reload this page.