Refactor API calls to use apiRequest instead of clientFetch

Replaces all usages of clientFetch with the new apiRequest utility across dashboard pages, modal components, and the profit analytics service. This standardizes API interaction and improves consistency in request handling.
This commit is contained in:
g
2025-12-12 20:05:26 +00:00
parent fd5440c4da
commit 07dcaf55c0
7 changed files with 26 additions and 37 deletions

View File

@@ -1,4 +1,4 @@
import { clientFetch } from '../api';
import { apiRequest } from '../api';
export interface ProfitOverview {
period: string;
@@ -63,7 +63,7 @@ export const getProfitOverview = async (
url += `?period=${period}`;
}
return clientFetch(url);
return apiRequest(url);
};
export const getProfitTrends = async (
@@ -82,5 +82,5 @@ export const getProfitTrends = async (
url += `?period=${period}`;
}
return clientFetch(url);
return apiRequest(url);
};