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 <noreply@anthropic.com>
This commit is contained in:
@@ -164,10 +164,11 @@ function flattenCategories(nodes: V2Category[]): AdminCategory[] {
|
||||
// ── Public API ────────────────────────────────────────────────────────────────
|
||||
|
||||
export async function fetchCategories(
|
||||
_type?: "video" | "image"
|
||||
type?: "video" | "image"
|
||||
): Promise<AdminCategory[]> {
|
||||
// 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<V2Category[]>("/v1/categories");
|
||||
return tree ? flattenCategories(tree) : [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user