fix: read dashboard stats response
This commit is contained in:
+2
-2
@@ -216,8 +216,8 @@ export const productTracesApi = {
|
||||
export const dashboardApi = {
|
||||
getStats: async () => {
|
||||
const response = await apiClient.get('/dashboard/stats');
|
||||
if (response.data.data) {
|
||||
const data = response.data.data;
|
||||
const data = response.data.data || response.data;
|
||||
if (data?.overview) {
|
||||
return {
|
||||
totalAftersales: data.overview?.totalAftersales || 0,
|
||||
pendingConfirmation: data.overview?.pendingConfirmation || 0,
|
||||
|
||||
Reference in New Issue
Block a user