diff --git a/app/components/events/Event.ts b/app/components/events/Event.ts index 4365120..a84c25d 100644 --- a/app/components/events/Event.ts +++ b/app/components/events/Event.ts @@ -15,7 +15,7 @@ export class Event static get(onSuccess: (events: Event[]) => void) { - axios.get("http://localhost:8080/events", {withCredentials: true}) + MavenApi.create().get("/events", {withCredentials: true}) .then((response) => { onSuccess(response.data) diff --git a/app/components/group/Group.ts b/app/components/group/Group.ts index c089e55..d74738d 100644 --- a/app/components/group/Group.ts +++ b/app/components/group/Group.ts @@ -2,14 +2,17 @@ import axios from "axios"; export class Group { - constructor ( + constructor( public groupId: string - ) {} + ) + { + } static get(onSuccess: (groups: Group[]) => void) { - axios.get("http://localhost:8080/groups") - .then((response) => { + MavenApi.create().get("/groups") + .then((response) => + { onSuccess(response.data) }); }