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 2f57466 commit 600ebad
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions app/pages/sample/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ const tabs = {
routeName: "sample-id-taxa",
title: "sample.taxa",
count: async () => {
return $geoloogiaFetch<GeoloogiaListResponse>("/taxon_list/", {
return $apiFetch<GeoloogiaListResponse>(`/samples/${route.params.id}/sample-taxa/`, {
query: {
sample: route.params.id,
limit: 0,
},
}).then(res => res.count);
Expand All @@ -63,9 +62,8 @@ const tabs = {
routeName: "sample-id-attachments",
title: "sample.attachments",
count: async () => {
return $geoloogiaFetch<GeoloogiaListResponse>("/attachment_link/", {
return $apiFetch<GeoloogiaListResponse>(`/samples/${route.params.id}/attachments/`, {
query: {
sample: route.params.id,
limit: 0,
},
}).then(res => res.count);
Expand All @@ -77,9 +75,8 @@ const tabs = {
routeName: "sample-id-references",
title: "sample.sampleReferences",
count: async () => {
return $geoloogiaFetch<GeoloogiaListResponse>("/sample_reference/", {
return $apiFetch<GeoloogiaListResponse>(`/samples/${route.params.id}/sample-references/`, {
query: {
sample: route.params.id,
limit: 0,
},
}).then(res => res.count);
Expand All @@ -105,9 +102,8 @@ const tabs = {
routeName: "sample-id-graphs",
title: "locality.graphs",
count: async () => {
return $geoloogiaFetch<GeoloogiaListResponse>("/taxon_list/", {
return $apiFetch<GeoloogiaListResponse>(`/samples/${route.params.id}/sample-taxa/`, {
query: {
sample: route.params.id,
limit: 0,
},
}).then(res => res.count);
Expand Down

0 comments on commit 600ebad

Please sign in to comment.