From b684c55452f9f4a20347413133c2f23318deb210 Mon Sep 17 00:00:00 2001 From: wspooong Date: Tue, 2 Apr 2024 23:39:36 +0800 Subject: [PATCH] Update API endpoints for document search --- src/layouts/GraphLayout.vue | 2 +- src/layouts/SearchLayout.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layouts/GraphLayout.vue b/src/layouts/GraphLayout.vue index db4f9f9..0b4081d 100644 --- a/src/layouts/GraphLayout.vue +++ b/src/layouts/GraphLayout.vue @@ -52,7 +52,7 @@ async function setWindowSize() { } async function fetchData() { - const response = await fetch(`/api/v1/search_similarity_network?uid=${route.params.uid}`); + const response = await fetch(`/api/v1/document/similarity?uid=${route.params.uid}`); if (response.status != 200) { router.push({ name: '404' }) } diff --git a/src/layouts/SearchLayout.vue b/src/layouts/SearchLayout.vue index 2cbdce8..466ac6b 100644 --- a/src/layouts/SearchLayout.vue +++ b/src/layouts/SearchLayout.vue @@ -82,7 +82,7 @@ const not_found_document = { async function fetchData() { query.value = route.query.q as string - const response = await fetch(`api/v1/search_title?query=${route.query.q}`); + const response = await fetch(`api/v1/document/title?query=${route.query.q}`); const jsonData = await response.json() if (response.status != 200) { documents.value = [error_document]