fix ts import syntax

This commit is contained in:
2023-12-20 17:28:57 +01:00
parent bc158279d8
commit cd29a14121
@@ -1,14 +1,14 @@
import {KarakterInputs} from "../domain-models/karakter"; import {KarakterInputs} from "../domain-models/karakter";
import * as axios from "axios"; import axios from "axios";
export async function StoreNewCharacter(karakter: KarakterInputs) { export async function StoreNewCharacter(karakter: KarakterInputs) {
let response = await axios.default.post(`${window.location.origin}/Character/`, karakter, { let response = await axios.post(`${window.location.origin}/Character/`, karakter, {
withCredentials: true, withCredentials: true,
}) })
if (response.status < 300){ if (response.status < 300){
return response.data as string return response.data as string
} }
else { else {
return Error(response.statusText) throw Error(response.statusText)
} }
} }