mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 23:49:38 +00:00
Refac APIClient to return data, error and status as object
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user