Update api.tsx

This commit is contained in:
Justin Edmund 2022-02-01 11:42:29 -08:00
parent 39549f0b94
commit 0dbcc7854b

View file

@ -65,8 +65,9 @@ class Api {
})
}
updateUncap(resource: 'characters'|'weapons'|'summons', id: string, value: number) {
const resourceUrl = `${this.url}/${resource}/update_uncap`
updateUncap(resource: 'character'|'weapon'|'summon', id: string, value: number) {
const pluralized = resource + 's'
const resourceUrl = `${this.url}/${pluralized}/update_uncap`
return axios.post(resourceUrl, {
[resource]: {
id: id,