switched to svelte 5

front gets a bit to complex to do in vanilla
This commit is contained in:
2025-05-16 18:59:19 +02:00
parent bccf019c11
commit d764e9699b
14 changed files with 994 additions and 419 deletions

32
web/src/lib/IDMapping.ts Normal file
View File

@@ -0,0 +1,32 @@
export interface IDMapping {
id_map: IDMap
}
export interface IDMap {
[name: string]: Name
}
export interface Name {
first: string,
last: string,
}
export async function addMapping(id: string, firstName: string, lastName: string) {
let req = await fetch("/api/mapping", {
method: "POST",
headers: {
"Content-type": "application/json; charset=UTF-8"
},
body: JSON.stringify({
id,
name: {
first: firstName,
lastName: lastName,
},
})
});
if (req.status != 200) {
console.error(await req.text())
}
}