update api fetch client

This commit is contained in:
Fran Jurmanović
2025-09-14 19:04:24 +02:00
parent 8a5afee0e3
commit 373adcb49d
6 changed files with 73 additions and 37 deletions

View File

@@ -9,8 +9,9 @@ export async function getServerStatistics(
startDate: string,
endDate: string
): Promise<StateHistoryStats> {
return fetchServerAPI<StateHistoryStats>(
const response = await fetchServerAPI<StateHistoryStats>(
`${serverRoute}/${serverId}/state-history/statistics?start_date=${startDate}&end_date=${endDate}`,
token
);
return response.data!;
}