Simplify Base URL

This commit is contained in:
Andreas Dinauer 2026-03-15 12:46:15 +01:00
parent fb8c649bae
commit 82a3a8f6da
2 changed files with 8 additions and 5 deletions

View File

@ -15,7 +15,7 @@ export class Event
static get(onSuccess: (events: Event[]) => void) static get(onSuccess: (events: Event[]) => void)
{ {
axios.get<Event[]>("http://localhost:8080/events", {withCredentials: true}) MavenApi.create().get<Event[]>("/events", {withCredentials: true})
.then((response) => .then((response) =>
{ {
onSuccess(response.data) onSuccess(response.data)

View File

@ -2,14 +2,17 @@ import axios from "axios";
export class Group export class Group
{ {
constructor ( constructor(
public groupId: string public groupId: string
) {} )
{
}
static get(onSuccess: (groups: Group[]) => void) static get(onSuccess: (groups: Group[]) => void)
{ {
axios.get<Group[]>("http://localhost:8080/groups") MavenApi.create().get<Group[]>("/groups")
.then((response) => { .then((response) =>
{
onSuccess(response.data) onSuccess(response.data)
}); });
} }