From e8c158769564174c50b3ccba74364b7bd6c0223c Mon Sep 17 00:00:00 2001 From: "soroush.asadi" Date: Sat, 30 May 2026 05:45:10 +0330 Subject: [PATCH] fix: satisfy next build ESLint in admin-api (unused param) next build runs ESLint (stricter than tsc --noEmit), which failed on the unused `type` param in fetchCategories with no-unused-vars, breaking the frontend production build. Reference it via `void type;` while keeping the signature for API compatibility. Co-Authored-By: Claude Opus 4.7 --- src/lib/admin-api.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/admin-api.ts b/src/lib/admin-api.ts index ef63ca7..3f00d04 100644 --- a/src/lib/admin-api.ts +++ b/src/lib/admin-api.ts @@ -164,10 +164,11 @@ function flattenCategories(nodes: V2Category[]): AdminCategory[] { // ── Public API ──────────────────────────────────────────────────────────────── export async function fetchCategories( - _type?: "video" | "image" + type?: "video" | "image" ): Promise { - // V2 categories have no video/image type; `_type` is accepted for API + // V2 categories have no video/image type; `type` is accepted for API // compatibility but the content service returns a single tree. + void type; const tree = await safeGet("/v1/categories"); return tree ? flattenCategories(tree) : []; }