replace raw usewrv with a query() call

feat/vaults
Tomáš Mládek 2021-07-03 21:20:20 +02:00
parent 7785671684
commit 6a1483ca27
1 changed files with 3 additions and 3 deletions

View File

@ -84,9 +84,9 @@ export function identify(attributes: ComputedRef<[string, IEntry][]>): ComputedR
// Out of those, retrieve their TYPE_ID entries
const { data: typeIdListing } = useSWRV<ListingResult, unknown>(() => {
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) => {