From 3a1b25a39844de44fa1e1db60829c9536f302472 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 18 Jun 2023 05:24:03 -0700 Subject: [PATCH] Add quick summon endpoint --- utils/api.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/utils/api.tsx b/utils/api.tsx index be24daa9..cbcf0e59 100644 --- a/utils/api.tsx +++ b/utils/api.tsx @@ -146,7 +146,13 @@ class Api { const resourceUrl = `${this.url}/favorites` return axios.delete(resourceUrl, { data: body, headers: params }) } - + + updateQuickSummon({ id, value, params }: { id: string, value: boolean, params?: {} }) { + const body = { summon: { id: id, quick_summon: value } } + const resourceUrl = `${this.url}/summons/update_quick_summon` + return axios.post(resourceUrl, body, { headers: params }) + } + updateUncap(resource: 'character'|'weapon'|'summon', id: string, value: number) { const pluralized = resource + 's' const resourceUrl = `${this.url}/${pluralized}/update_uncap`