initial upload

This commit is contained in:
Kai Waggeling 2025-05-17 16:23:48 +02:00
parent ac114da487
commit 7c1cfdff51
63 changed files with 6883 additions and 0 deletions

45
assets/api.js Normal file
View file

@ -0,0 +1,45 @@
const LabelApi = {
async GET(Endpoint)
{
const Response = await fetch(`/api/${Endpoint}`, {
method: "GET"
});
return Response.json();
},
async POST(Endpoint, BodyData = {})
{
const Response = await fetch(`/api/${Endpoint}`, {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(BodyData)
});
return Response.json();
},
async PUT(Endpoint, BodyData = {})
{
const Response = await fetch(`/api/${Endpoint}`, {
method: "PUT",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(BodyData)
});
return Response.json();
},
async DELETE(Endpoint, BodyData = {})
{
const Response = await fetch(`/api/${Endpoint}`, {
method: "DELETE",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(BodyData)
});
}
}