From e2113e09107d6135547f4a3062dc4967080b4294 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Mon, 21 Aug 2023 17:29:06 -0700 Subject: [PATCH] Send exclusions to api when searching all entities --- utils/api.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/api.tsx b/utils/api.tsx index 63ac5ba4..e5e01ca1 100644 --- a/utils/api.tsx +++ b/utils/api.tsx @@ -70,11 +70,15 @@ class Api { }) } - searchAll(query: string, locale: string) { + searchAll(query: string, exclude: string[], locale: string) { const resourceUrl = `${this.url}/search` + // Also send list of Granblue IDs + // so the backend can exclude opposites and duplicates + // Maybe store them in state??? return axios.post(`${resourceUrl}`, { search: { query: query, + exclude: exclude, locale: locale } })