Skip to content

Commit

Permalink
Remove unused fetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed Jul 26, 2024
1 parent 684053e commit 91390bc
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions client/src/components/History/services.ts
Original file line number Diff line number Diff line change
@@ -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<unknown>
) {
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}`;
}
Expand Down

0 comments on commit 91390bc

Please sign in to comment.