diff --git a/frontend/src/api/endpoints.ts b/frontend/src/api/endpoints.ts index 81d19c87..955f43ee 100644 --- a/frontend/src/api/endpoints.ts +++ b/frontend/src/api/endpoints.ts @@ -38,6 +38,7 @@ const endpoints = { UPDATE_TOOL_STATUS: '/api/update_tool_status', UPDATE_TOOL: '/api/update_tool', DELETE_TOOL: '/api/delete_tool', + SYNC_CONNECTOR: '/api/connectors/sync', GET_CHUNKS: ( docId: string, page: number, diff --git a/frontend/src/api/services/userService.ts b/frontend/src/api/services/userService.ts index af5e4f22..7d365b3d 100644 --- a/frontend/src/api/services/userService.ts +++ b/frontend/src/api/services/userService.ts @@ -104,6 +104,18 @@ const userService = { apiClient.get(endpoints.USER.DIRECTORY_STRUCTURE(docId), token), manageSourceFiles: (data: FormData, token: string | null): Promise => apiClient.postFormData(endpoints.USER.MANAGE_SOURCE_FILES, data, token), + syncConnector: (docId: string, token: string | null): Promise => { + const sessionToken = localStorage.getItem('google_drive_session_token'); + return apiClient.post( + endpoints.USER.SYNC_CONNECTOR, + { + source_id: docId, + session_token: sessionToken, + provider: 'google_drive' + }, + token + ); + }, }; export default userService; diff --git a/frontend/src/components/ConnectorTreeComponent.tsx b/frontend/src/components/ConnectorTreeComponent.tsx index a4258dfc..96e235c6 100644 --- a/frontend/src/components/ConnectorTreeComponent.tsx +++ b/frontend/src/components/ConnectorTreeComponent.tsx @@ -171,7 +171,6 @@ const ConnectorTreeComponent: React.FC = ({ variant: 'primary', }); - // No delete option for connector files return options; };