Skip to content

Commit

Permalink
refactor: move to new api
Browse files Browse the repository at this point in the history
  • Loading branch information
Erikdzo committed Nov 17, 2024
1 parent 600ebad commit beb68cf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/pages/stratigraphy/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -24,9 +24,8 @@ const tabs = {
routeName: "stratigraphy-id-references",
title: "stratigraphy.references",
count: async () => {
return $geoloogiaFetch<GeoloogiaListResponse>("/stratigraphy_reference/", {
return $apiFetch<GeoloogiaListResponse>(`/stratigraphies/${route.params.id}/stratigraphy-references/`, {
query: {
stratigraphy: route.params.id,
limit: 0,
},
}).then(res => res.count);
Expand All @@ -38,9 +37,8 @@ const tabs = {
routeName: "stratigraphy-id-synonyms",
title: "stratigraphy.synonyms",
count: async () => {
const res = await $geoloogiaFetch<GeoloogiaListResponse>("/stratigraphy_synonym/", {
const res = await $apiFetch<GeoloogiaListResponse>(`/stratigraphies/${route.params.id}/stratigraphy-synonyms/`, {
query: {
stratigraphy: route.params.id,
limit: 0,
},
});
Expand Down

0 comments on commit beb68cf

Please sign in to comment.