Fix summon transcendence
Summon transcendence was doing something wonky. This adapts the updateUncap endpoint method to make it a little bit clearer whats going on.
This commit is contained in:
parent
8705c8d143
commit
f707ac505f
2 changed files with 14 additions and 5 deletions
|
|
@ -261,9 +261,7 @@ const SummonGrid = (props: Props) => {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (stage != previousTranscendenceStages[position])
|
if (stage != previousTranscendenceStages[position])
|
||||||
await api.endpoints.grid_summons
|
await api.updateTranscendence('summon', id, stage).then((response) => {
|
||||||
.update(id, payload)
|
|
||||||
.then((response) => {
|
|
||||||
storeGridSummon(response.data.grid_summon)
|
storeGridSummon(response.data.grid_summon)
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
||||||
|
|
@ -180,6 +180,17 @@ class Api {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateTranscendence(resource: 'character'|'summon', id: string, value: number) {
|
||||||
|
const pluralized = resource + 's'
|
||||||
|
const resourceUrl = `${this.url}/${pluralized}/update_uncap`
|
||||||
|
return axios.post(resourceUrl, {
|
||||||
|
[resource]: {
|
||||||
|
id: id,
|
||||||
|
transcendence_step: value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
userInfo(id: string) {
|
userInfo(id: string) {
|
||||||
const resourceUrl = `${this.url}/users/info/${id}`
|
const resourceUrl = `${this.url}/users/info/${id}`
|
||||||
return axios.get(resourceUrl)
|
return axios.get(resourceUrl)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue