✨ 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)
|
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)
|
||||||
|
|||||||
@ -4,12 +4,15 @@ 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)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user