diff --git a/components/dashboard/NewChatForm.tsx b/components/dashboard/NewChatForm.tsx index 32aa5ed..6225cf2 100644 --- a/components/dashboard/NewChatForm.tsx +++ b/components/dashboard/NewChatForm.tsx @@ -115,10 +115,10 @@ export default function NewChatForm() { } }); - const response = await authAxios.post("/api/chats/create", { + const response = await authAxios.post("/chats/create", { buyerId, storeId: selectedStore, - initialMessage + initialMessage: initialMessage.trim() || undefined }); if (response.data.chatId) {