diff --git a/client/src/api/histories.ts b/client/src/api/histories.ts index a4246a6b435f..be90050dcb66 100644 --- a/client/src/api/histories.ts +++ b/client/src/api/histories.ts @@ -6,5 +6,4 @@ export const deleteHistory = fetcher.path("/api/histories/{history_id}").method( export const deleteHistories = fetcher.path("/api/histories/batch/delete").method("put").create(); export const undeleteHistory = fetcher.path("/api/histories/deleted/{history_id}/undelete").method("post").create(); export const undeleteHistories = fetcher.path("/api/histories/batch/undelete").method("put").create(); -export const historiesQuery = fetcher.path("/api/histories").method("get").create(); export const publishedHistoriesFetcher = fetcher.path("/api/histories/published").method("get").create(); diff --git a/client/src/components/Grid/configs/histories.ts b/client/src/components/Grid/configs/histories.ts index 3042aa515983..d5df8a38d50a 100644 --- a/client/src/components/Grid/configs/histories.ts +++ b/client/src/components/Grid/configs/histories.ts @@ -10,7 +10,7 @@ import { } from "@fortawesome/free-solid-svg-icons"; import { useEventBus } from "@vueuse/core"; -import { deleteHistories, deleteHistory, historiesQuery, undeleteHistories, undeleteHistory } from "@/api/histories"; +import { deleteHistories, deleteHistory, historiesFetcher, undeleteHistories, undeleteHistory } from "@/api/histories"; import { updateTags } from "@/api/tags"; import { useHistoryStore } from "@/stores/historyStore"; import Filtering, { contains, equals, expandNameTag, toBool, type ValidFilter } from "@/utils/filtering"; @@ -31,7 +31,7 @@ type SortKeyLiteral = "create_time" | "name" | "update_time" | undefined; * Request and return data from server */ async function getData(offset: number, limit: number, search: string, sort_by: string, sort_desc: boolean) { - const { data, headers } = await historiesQuery({ + const { data, headers } = await historiesFetcher({ limit, offset, search, diff --git a/client/src/components/Grid/configs/historiesShared.ts b/client/src/components/Grid/configs/historiesShared.ts index 82af38e83c51..e3be64ff3f07 100644 --- a/client/src/components/Grid/configs/historiesShared.ts +++ b/client/src/components/Grid/configs/historiesShared.ts @@ -1,7 +1,7 @@ import { faEye } from "@fortawesome/free-solid-svg-icons"; import { useEventBus } from "@vueuse/core"; -import { historiesQuery } from "@/api/histories"; +import { historiesFetcher } from "@/api/histories"; import { updateTags } from "@/api/tags"; import Filtering, { contains, expandNameTag, type ValidFilter } from "@/utils/filtering"; import _l from "@/utils/localization"; @@ -21,7 +21,7 @@ type SortKeyLiteral = "create_time" | "name" | "update_time" | undefined; * Request and return data from server */ async function getData(offset: number, limit: number, search: string, sort_by: string, sort_desc: boolean) { - const { data, headers } = await historiesQuery({ + const { data, headers } = await historiesFetcher({ limit, offset, search,