feat: add auth
This commit is contained in:
@@ -8,6 +8,7 @@ export async function GET(request: NextRequest) {
|
||||
const type = searchParams.get("type") || "all";
|
||||
const page = searchParams.get("page") || "1";
|
||||
const limit = searchParams.get("limit") || "20";
|
||||
const exact = searchParams.get("exact") === "1" ? "1" : "";
|
||||
|
||||
if (!q.trim()) {
|
||||
return NextResponse.json({
|
||||
@@ -27,6 +28,7 @@ export async function GET(request: NextRequest) {
|
||||
url.searchParams.set("type", type);
|
||||
url.searchParams.set("page", page);
|
||||
url.searchParams.set("limit", limit);
|
||||
if (exact) url.searchParams.set("exact", "1");
|
||||
|
||||
const res = await fetch(url.toString(), {
|
||||
headers: { Accept: "application/json" },
|
||||
|
||||
Reference in New Issue
Block a user