Globale Orphan-Bereinigung: /api/purge-all-orphans + UI-Button

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 20:42:13 +02:00
parent 8f01c0396e
commit ae10e60897
3 changed files with 65 additions and 0 deletions

View File

@@ -291,3 +291,13 @@ export async function purgeOrphans(objId: string, token: string): Promise<{ orph
if (!res.ok) throw new Error('Fehler beim Bereinigen')
return data
}
export async function purgeAllOrphans(token: string): Promise<{ orphans_removed: number }> {
const res = await fetch('/api/purge-all-orphans', {
method: 'POST',
headers: { Authorization: `Bearer ${token}` },
})
const data = await res.json()
if (!res.ok) throw new Error('Fehler beim globalen Bereinigen')
return data
}