From beb68cf362cc030042b90c78d23d7d38e58b5893 Mon Sep 17 00:00:00 2001 From: Erik Dzotsenidze Date: Sun, 17 Nov 2024 13:05:09 +0200 Subject: [PATCH] refactor: move to new api --- app/pages/stratigraphy/[id].vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/pages/stratigraphy/[id].vue b/app/pages/stratigraphy/[id].vue index 66fd304b..7bf4e089 100644 --- a/app/pages/stratigraphy/[id].vue +++ b/app/pages/stratigraphy/[id].vue @@ -5,7 +5,7 @@ import type { Tab } from "~/composables/useTabs"; const route = useRoute(); const localePath = useLocalePath(); const { t } = useI18n(); -const { $translate, $geoloogiaFetch, $solrFetch, $apiFetch } = useNuxtApp(); +const { $translate, $solrFetch, $apiFetch } = useNuxtApp(); const stratigraphiesStore = useStratigraphies(); const { getQueryParams } = stratigraphiesStore; const { solrFilters, solrQuery, solrSort } = storeToRefs(stratigraphiesStore); @@ -24,9 +24,8 @@ const tabs = { routeName: "stratigraphy-id-references", title: "stratigraphy.references", count: async () => { - return $geoloogiaFetch("/stratigraphy_reference/", { + return $apiFetch(`/stratigraphies/${route.params.id}/stratigraphy-references/`, { query: { - stratigraphy: route.params.id, limit: 0, }, }).then(res => res.count); @@ -38,9 +37,8 @@ const tabs = { routeName: "stratigraphy-id-synonyms", title: "stratigraphy.synonyms", count: async () => { - const res = await $geoloogiaFetch("/stratigraphy_synonym/", { + const res = await $apiFetch(`/stratigraphies/${route.params.id}/stratigraphy-synonyms/`, { query: { - stratigraphy: route.params.id, limit: 0, }, });