From 31eb089c4c76457a68c26e3a654ec9988abbdbf3 Mon Sep 17 00:00:00 2001 From: NarwhalChen Date: Wed, 22 Jan 2025 12:54:41 -0600 Subject: [PATCH] fix: fixing bug of cannot delete chat history --- backend/src/chat/chat.service.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/backend/src/chat/chat.service.ts b/backend/src/chat/chat.service.ts index 14e62c33..d400d098 100644 --- a/backend/src/chat/chat.service.ts +++ b/backend/src/chat/chat.service.ts @@ -106,7 +106,6 @@ export class ChatService { async deleteChat(chatId: string): Promise { const chat = await this.chatRepository.findOne({ where: { id: chatId, isDeleted: false }, - relations: ['messages'], }); if (chat) { @@ -114,7 +113,6 @@ export class ChatService { chat.isDeleted = true; chat.isActive = false; await this.chatRepository.save(chat); - return true; } return false;