mirror of
https://github.com/morbalint/kemkas.git
synced 2026-07-18 03:13:46 +00:00
fix ts import syntax
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user