add local run and save button

This commit is contained in:
2023-12-20 12:53:30 +01:00
parent 7bb7ab6f13
commit f619cc850a
11 changed files with 184 additions and 31 deletions
@@ -0,0 +1,14 @@
import {KarakterInputs} from "../domain-models/karakter";
import * as axios from "axios";
export async function StoreNewCharacter(karakter: KarakterInputs) {
let response = await axios.default.post(`${window.location.origin}/Character/`, karakter, {
withCredentials: true,
})
if (response.status < 300){
return response.data as string
}
else {
return Error(response.statusText)
}
}