mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-30 09:03:15 +00:00
feat: analytics dashboard with respective endpoints
This commit is contained in:
@@ -12,6 +12,9 @@ const endpoints = {
|
||||
SINGLE_PROMPT: (id: string) => `/api/get_single_prompt?id=${id}`,
|
||||
DELETE_PATH: (docPath: string) => `/api/delete_old?path=${docPath}`,
|
||||
TASK_STATUS: (task_id: string) => `/api/task_status?task_id=${task_id}`,
|
||||
MESSAGE_ANALYTICS: '/api/get_message_analytics',
|
||||
TOKEN_ANALYTICS: '/api/get_token_analytics',
|
||||
FEEDBACK_ANALYTICS: '/api/get_feedback_analytics',
|
||||
},
|
||||
CONVERSATION: {
|
||||
ANSWER: '/api/answer',
|
||||
|
||||
@@ -23,6 +23,12 @@ const userService = {
|
||||
apiClient.get(endpoints.USER.DELETE_PATH(docPath)),
|
||||
getTaskStatus: (task_id: string): Promise<any> =>
|
||||
apiClient.get(endpoints.USER.TASK_STATUS(task_id)),
|
||||
getMessageAnalytics: (data: any): Promise<any> =>
|
||||
apiClient.post(endpoints.USER.MESSAGE_ANALYTICS, data),
|
||||
getTokenAnalytics: (data: any): Promise<any> =>
|
||||
apiClient.post(endpoints.USER.TOKEN_ANALYTICS, data),
|
||||
getFeedbackAnalytics: (data: any): Promise<any> =>
|
||||
apiClient.post(endpoints.USER.FEEDBACK_ANALYTICS, data),
|
||||
};
|
||||
|
||||
export default userService;
|
||||
|
||||
Reference in New Issue
Block a user