embedded image finishing

This commit is contained in:
Stefan Hardegger
2025-09-17 10:28:35 +02:00
parent e5596b5a17
commit c0b3ae3b72
8 changed files with 740 additions and 20 deletions

View File

@@ -577,6 +577,38 @@ export const configApi = {
const response = await api.get('/config/html-sanitization');
return response.data;
},
previewImageCleanup: async (): Promise<{
success: boolean;
orphanedCount: number;
totalSizeBytes: number;
formattedSize: string;
foldersToDelete: number;
referencedImagesCount: number;
errors: string[];
hasErrors: boolean;
dryRun: boolean;
error?: string;
}> => {
const response = await api.post('/config/cleanup/images/preview');
return response.data;
},
executeImageCleanup: async (): Promise<{
success: boolean;
deletedCount: number;
totalSizeBytes: number;
formattedSize: string;
foldersDeleted: number;
referencedImagesCount: number;
errors: string[];
hasErrors: boolean;
dryRun: boolean;
error?: string;
}> => {
const response = await api.post('/config/cleanup/images/execute');
return response.data;
},
};
// Collection endpoints