ci: split repo: make this repo frontend only again

This commit is contained in:
2024-03-09 00:08:09 +01:00
parent 5f56f34b4e
commit b132a5801b
308 changed files with 9 additions and 43867 deletions
@@ -0,0 +1,32 @@
import {KarakterInputs} from "../domain-models/karakter";
import axios from "axios";
export async function StoreNewCharacter(karakter: KarakterInputs, isPublic: boolean = false) {
let response = await axios.post(`${window.location.origin}/api/Character1E/`, karakter, {
withCredentials: true,
params: {
isPublic,
}
})
if (response.status < 300){
return response.data as string
}
else {
throw Error(response.statusText)
}
}
export async function UpdateCharacter(id: string, karakter: KarakterInputs, isPublic: boolean = false) {
let response = await axios.post(`${window.location.origin}/api/Character1E/${id}`, karakter, {
withCredentials: true,
params: {
isPublic,
}
})
if (response.status < 300){
return response.data as string
}
else {
throw Error(response.statusText)
}
}