This commit is contained in:
Tomas Dvorak
2025-10-17 17:39:11 +02:00
parent 35d0954afd
commit e9a63073e5
61 changed files with 3824 additions and 1061 deletions
+19
View File
@@ -100,6 +100,25 @@ export const scanAndSyncFiles = async (): Promise<{
return response.data;
};
export const refreshFileTracking = async (entityType?: string): Promise<{
message: string;
stats: {
articles_scanned: number;
events_scanned: number;
players_scanned: number;
sponsors_scanned: number;
contacts_scanned: number;
teams_scanned: number;
settings_scanned: number;
};
}> => {
const response = await axios.post(`${API_URL}/admin/files/refresh-tracking`, {}, {
params: entityType ? { entity_type: entityType } : {},
withCredentials: true,
});
return response.data;
};
export const formatFileSize = (bytes: number): string => {
if (bytes === 0) return '0 B';
const k = 1024;