feat: add auth

This commit is contained in:
gosangam
2026-05-30 02:34:22 +05:30
parent 3767a3a9b6
commit 6b6ce0813e
23 changed files with 2025 additions and 447 deletions
+2
View File
@@ -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" },