From 97ea6665617abad783ae71585d56977d83092eb9 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Wed, 5 Jul 2023 18:48:42 -0700 Subject: [PATCH] Add new api endpoint for searching all resources --- utils/api.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/utils/api.tsx b/utils/api.tsx index bba56760..7ef3f082 100644 --- a/utils/api.tsx +++ b/utils/api.tsx @@ -69,6 +69,15 @@ class Api { } }) } + + searchAll(query: string) { + const resourceUrl = `${this.url}/search` + return axios.post(`${resourceUrl}`, { + search: { + query: query, + } + }) + } check(resource: string, value: string) { const resourceUrl = `${this.url}/check/${resource}`