mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-01 15:37:32 +08:00
14 lines
567 B
TypeScript
14 lines
567 B
TypeScript
import axios from "axios";
|
|
|
|
import { type components, fetcher } from "@/api/schema";
|
|
|
|
type GroupModel = components["schemas"]["GroupModel"];
|
|
export async function getAllGroups(): Promise<GroupModel[]> {
|
|
const { data } = await axios.get("/api/groups");
|
|
return data;
|
|
}
|
|
|
|
export const deleteGroup = fetcher.path("/api/groups/{group_id}").method("delete").create();
|
|
export const purgeGroup = fetcher.path("/api/groups/{group_id}/purge").method("post").create();
|
|
export const undeleteGroup = fetcher.path("/api/groups/{group_id}/undelete").method("post").create();
|