From d1dedff9caad95a0c7222e2181ffdfe1c0a97303 Mon Sep 17 00:00:00 2001 From: Siddhant Rai <47355538+siiddhantt@users.noreply.github.com> Date: Mon, 29 Jul 2024 12:15:18 +0530 Subject: [PATCH 1/2] fix: delete all method type --- frontend/src/api/services/conversationService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/api/services/conversationService.ts b/frontend/src/api/services/conversationService.ts index 9e31df84..aaf703de 100644 --- a/frontend/src/api/services/conversationService.ts +++ b/frontend/src/api/services/conversationService.ts @@ -23,8 +23,8 @@ const conversationService = { apiClient.get(endpoints.CONVERSATION.SHARED_CONVERSATION(identifier)), delete: (id: string, data: any): Promise => apiClient.post(endpoints.CONVERSATION.DELETE(id), data), - deleteAll: (data: any): Promise => - apiClient.post(endpoints.CONVERSATION.DELETE_ALL, data), + deleteAll: (): Promise => + apiClient.get(endpoints.CONVERSATION.DELETE_ALL), update: (data: any): Promise => apiClient.post(endpoints.CONVERSATION.UPDATE, data), }; From 60db807443d51a8d5dda2d111b1c0dc8f363c8eb Mon Sep 17 00:00:00 2001 From: Siddhant Rai <47355538+siiddhantt@users.noreply.github.com> Date: Mon, 29 Jul 2024 12:17:05 +0530 Subject: [PATCH 2/2] Update Navigation.tsx --- frontend/src/Navigation.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/Navigation.tsx b/frontend/src/Navigation.tsx index 22ab5017..bd0d460c 100644 --- a/frontend/src/Navigation.tsx +++ b/frontend/src/Navigation.tsx @@ -108,7 +108,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { const handleDeleteAllConversations = () => { conversationService - .deleteAll({}) + .deleteAll() .then(() => { fetchConversations(); })