Add dashboard backup catalog and health tools

This commit is contained in:
Codex
2026-04-25 02:51:29 +00:00
parent ed7b7e38ea
commit 989d842d78
16 changed files with 923 additions and 13 deletions
+23
View File
@@ -0,0 +1,23 @@
import { NextResponse } from "next/server"
import { deleteCatalogBackup } from "@/app/lib/backupCatalog"
import { recordActivity } from "@/app/lib/activityLog"
export async function DELETE(
_request: Request,
{ params }: { params: Promise<{ backupId: string }> },
) {
try {
const { backupId } = await params
await deleteCatalogBackup(backupId)
await recordActivity({
type: "backup.catalog.delete",
status: "success",
message: `Deleted catalog backup ${backupId}.`,
metadata: { backupId },
})
return NextResponse.json({ ok: true })
} catch (error) {
const message = error instanceof Error ? error.message : "Failed to delete backup"
return NextResponse.json({ ok: false, error: message }, { status: 500 })
}
}