From 6a1483ca27bae13d50e039f1446470fe9a9c843f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Sat, 3 Jul 2021 21:20:20 +0200 Subject: [PATCH] replace raw usewrv with a query() call --- ui/src/lib/entity.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/src/lib/entity.ts b/ui/src/lib/entity.ts index 2290ae7..47b1ce5 100644 --- a/ui/src/lib/entity.ts +++ b/ui/src/lib/entity.ts @@ -84,9 +84,9 @@ export function identify(attributes: ComputedRef<[string, IEntry][]>): ComputedR // Out of those, retrieve their TYPE_ID entries - const { data: typeIdListing } = useSWRV(() => { - return isEntries.value && `/api/obj?query=(matches (in ${isEntries.value.map((e) => `"${e}"`).join(" ")}) "TYPE_ID" ?)`; - }, fetcher); + const { data: typeIdListing } = query(() => { + return isEntries.value && `(matches (in ${isEntries.value.map((e) => `"${e}"`).join(" ")}) "TYPE_ID" ?)`; + }); const typeIdAttributes: ComputedRef<[string, string][]> = computed(() => { return Object.values(typeIdListing.value || {}).map((entry) => {