import axios from "axios"; import type {Artifact} from "~/components/artifact/Artifact"; export class Group { constructor( public id: string, public groupId: string, public artifacts: Artifact[] ) { } static get(onSuccess: (groups: Group[]) => void) { MavenApi.create().get("/groups") .then((response) => { onSuccess(response.data) }); } static getById(id: string, onSuccess: (group: Group) => void) { MavenApi.create().get("/groups/" + id) .then((response) => { onSuccess(response.data) }); } }