mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-10-29 16:04:43 +00:00
dev day #63
This commit is contained in:
1 parent
35d0954afd
commit
e9a63073e5
61 files changed
+3824
-1061
No files matched your search
@@ -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