From 91390bcd183d7c336ae8cd885a3d341d64cd7beb Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Fri, 26 Jul 2024 19:35:14 +0200 Subject: [PATCH] Remove unused fetcher --- client/src/components/History/services.ts | 29 ----------------------- 1 file changed, 29 deletions(-) diff --git a/client/src/components/History/services.ts b/client/src/components/History/services.ts index 572cb8768e8b..9a8feafe027b 100644 --- a/client/src/components/History/services.ts +++ b/client/src/components/History/services.ts @@ -1,37 +1,8 @@ import axios from "axios"; -import { fetcher } from "@/api/schema"; import { type Input, permissionInputParts } from "@/composables/datasetPermissions"; -import type Filtering from "@/utils/filtering"; import { withPrefix } from "@/utils/redirect"; -const publishedHistoriesFetcher = fetcher.path("/api/histories/published").method("get").create(); -export async function getPublishedHistories( - limit: number, - offset: number | null, - sortBy: string, - sortDesc: boolean, - filterText: string, - filters: Filtering -) { - const view = "summary"; - const keys = "username,username_and_slug"; - const queryDict = filters.getQueryDict(filterText); - const order = sortBy ? `${sortBy}${sortDesc ? "-dsc" : "-asc"}` : undefined; - - const { data } = await publishedHistoriesFetcher({ - limit, - offset, - order, - view, - keys, - q: Object.keys(queryDict), - qv: Object.entries(queryDict).map(([__, v]) => v as string), - }); - - return data; -} - export function getPermissionsUrl(historyId: string) { return `/history/permissions?id=${historyId}`; }