Refac APIClient to return data, error and status as object

This commit is contained in:
MerlinScheurer
2025-03-20 20:30:08 +01:00
parent 52083e6fb7
commit edcede5de6
67 changed files with 660 additions and 544 deletions

View File

@@ -1,7 +1,14 @@
import APIClient from '../../functions/APIClient';
export type DownloadStatsType = {
pending: number;
pending_videos: number;
pending_shorts: number;
pending_streams: number;
};
const loadStatsDownload = async () => {
return APIClient('/api/stats/download/');
return APIClient<DownloadStatsType>('/api/stats/download/');
};
export default loadStatsDownload;