feat: add catalog audit page
Deploy / release (push) Skipped
Deploy / deploy (push) Successful in 1m56s

Checks for:
- items_base entries without catalog_items (not purchasable)
- catalog_items referencing non-existent items_base
- Items without .nitro or icon files on disk
- Duplicate classnames
- Items missing from all configured clone sources
This commit is contained in:
openhands committed 2026-07-21 15:24:58 +02:00
1 parent 90107c83d5
commit 19e4e10b1d
6 files changed
+607 -1

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
import { withAdmin } from "@/lib/api-handler";
import { apiError, apiOk } from "@/lib/api-response";
import { PERMS } from "@/lib/permissions";
import { runCatalogAudit } from "@/lib/services/catalog-audit";
export const POST = withAdmin({ permission: PERMS.ASSETS_IMPORT }, async () => {
try {
const result = await runCatalogAudit();
return apiOk(result as unknown as Record<string, unknown>);
} catch (err) {
return apiError(`Audit failed: ${(err as Error).message}`, 500);
}
});