From f784bed928308481329f4b8cce04986d724b779a Mon Sep 17 00:00:00 2001 From: Aresn Date: Fri, 31 May 2024 15:34:38 +0800 Subject: [PATCH] delete thread --- components/i/action/Thread.vue | 21 +++++++++++++++++++-- components/i/search/Header.vue | 4 ++++ composables/useCollectionRequest.js | 11 ++++++++++- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/components/i/action/Thread.vue b/components/i/action/Thread.vue index 6b84b0b..d7d731f 100644 --- a/components/i/action/Thread.vue +++ b/components/i/action/Thread.vue @@ -9,9 +9,11 @@ \ No newline at end of file diff --git a/composables/useCollectionRequest.js b/composables/useCollectionRequest.js index 4293e8d..1ce1bea 100644 --- a/composables/useCollectionRequest.js +++ b/composables/useCollectionRequest.js @@ -54,12 +54,21 @@ export default () => { const {data, error} = await useRequest(`/v1/collection/item/check/${c_id}`) return { data, error } } + + const deleteThread = async (ids) => { + const {data, error} = await useRequest('/v1/chat/completion/remove', { + method: 'post', + body: ids + }) + return { data, error } + } return { setOrUpdateCollection, deleteCollection, saveCollection, findCollection, deleteCollectionRecord, - findRecordCollection + findRecordCollection, + deleteThread } } \ No newline at end of file -- GitLab