mirror of
https://github.com/morbalint/kemkas.git
synced 2026-07-17 19:03:46 +00:00
fix ts import syntax
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import {KarakterInputs} from "../domain-models/karakter";
|
||||
import * as axios from "axios";
|
||||
import axios from "axios";
|
||||
|
||||
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,
|
||||
})
|
||||
if (response.status < 300){
|
||||
return response.data as string
|
||||
}
|
||||
else {
|
||||
return Error(response.statusText)
|
||||
throw Error(response.statusText)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user