✨ Simplify Base URL
This commit is contained in:
parent
fb8c649bae
commit
82a3a8f6da
@ -15,7 +15,7 @@ export class Event
|
||||
|
||||
static get(onSuccess: (events: Event[]) => void)
|
||||
{
|
||||
axios.get<Event[]>("http://localhost:8080/events", {withCredentials: true})
|
||||
MavenApi.create().get<Event[]>("/events", {withCredentials: true})
|
||||
.then((response) =>
|
||||
{
|
||||
onSuccess(response.data)
|
||||
|
||||
@ -2,14 +2,17 @@ import axios from "axios";
|
||||
|
||||
export class Group
|
||||
{
|
||||
constructor (
|
||||
constructor(
|
||||
public groupId: string
|
||||
) {}
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
static get(onSuccess: (groups: Group[]) => void)
|
||||
{
|
||||
axios.get<Group[]>("http://localhost:8080/groups")
|
||||
.then((response) => {
|
||||
MavenApi.create().get<Group[]>("/groups")
|
||||
.then((response) =>
|
||||
{
|
||||
onSuccess(response.data)
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user