add local run and save button

This commit is contained in:
morbalint committed 2023-12-20 12:54:25 +01:00
1 parent 7bb7ab6f13
commit f619cc850a
11 files changed
+184 -31

No files matched your search

@@ -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)
}
}