CoolFace
Apppublic

DataScope26/WEB

sourceHugging Faceupdated 7d agoView on Hugging Face
0likes
apiDashboard.js24 linesDownload Raw Back to services
1import axiosClient from "./axiosClient.js";2 3export const dashboardMetrics = async (token, companyId, area = "general", startDate, endDate) => {4    try {5        const response = await axiosClient.get(6            "/dashboardMetrics",7            {8                headers: {9                    Authorization: token10                },11                params: {12                    companyId: companyId,13                    area: area,14                    startDate: startDate,15                    endDate: endDate16                }17            }18        );19        return response.data; // incluye { adoptionRate, estimatedUsageTime, platformUsage, promptQuality, mainTasks, availableAreas }20    } catch (error) {21        throw error;22        23    }24};