mirror of
https://github.com/morbalint/kemkas.git
synced 2026-07-18 03:13:46 +00:00
update character
This commit is contained in:
@@ -12,3 +12,16 @@ export async function StoreNewCharacter(karakter: KarakterInputs) {
|
||||
throw Error(response.statusText)
|
||||
}
|
||||
}
|
||||
|
||||
export async function UpdateCharacter(id: string, karakter: KarakterInputs) {
|
||||
let response = await axios.post(`${window.location.origin}/api/Character/${id}`, karakter, {
|
||||
withCredentials: true,
|
||||
})
|
||||
if (response.status < 300){
|
||||
return response.data as string
|
||||
}
|
||||
else {
|
||||
throw Error(response.statusText)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user