16 lines
324 B
TypeScript
16 lines
324 B
TypeScript
import axios from "axios";
|
|
|
|
export class Group
|
|
{
|
|
constructor (
|
|
public groupId: string
|
|
) {}
|
|
|
|
static get(onSuccess: (groups: Group[]) => void)
|
|
{
|
|
axios.get<Group[]>("http://localhost:8080/groups")
|
|
.then((response) => {
|
|
onSuccess(response.data)
|
|
});
|
|
}
|
|
} |