Globale Orphan-Bereinigung: /api/purge-all-orphans + UI-Button
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user