diff --git a/server/app/controller/chat.js b/server/app/controller/chat.js index 39b2121..0b6ced7 100644 --- a/server/app/controller/chat.js +++ b/server/app/controller/chat.js @@ -60,9 +60,8 @@ async function saveChatHistory({ res, request }) { async function removeChatHistory({ res, request }) { let { params: { id } } = request - console.log(id) if (!id) return res.fail({ data: false, msg: '参数错误' }) - await chatHistoryDB.removeAsync({ id }) + await chatHistoryDB.removeAsync({ _id: id }) res.success({ data: true }) } diff --git a/web/src/components/ai-chat/index.vue b/web/src/components/ai-chat/index.vue index dd0ca10..692197b 100644 --- a/web/src/components/ai-chat/index.vue +++ b/web/src/components/ai-chat/index.vue @@ -32,15 +32,22 @@