mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-04 02:32:57 +00:00
dev day #63
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user