Skip to content

Commit

Permalink
Remove duplicated service method for dataset details
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed Oct 12, 2023
1 parent eb0c5ac commit 97fb7c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 3 additions & 2 deletions client/src/components/Dataset/DatasetLink/DatasetLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
</template>

<script>
import { getDatasetDetails } from "components/Dataset/services";
import { mapCacheActions } from "vuex-cache";
import { fetchDatasetDetails } from "@/stores/services/dataset.service";
export default {
props: {
history_dataset_id: {
Expand Down Expand Up @@ -57,7 +58,7 @@ export default {
});
} else {
// download whole dataset
getDatasetDetails(this.history_dataset_id).then((response) => {
fetchDatasetDetails({ id: this.history_dataset_id }).then((response) => {
this.pathDestination = { fileLink: `${response.download_url}?to_ext=${response.file_ext}` };
});
}
Expand Down
6 changes: 0 additions & 6 deletions client/src/components/Dataset/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,3 @@ export async function updateTags(
export function getCompositeDatasetLink(historyDatasetId: string, path: string) {
return withPrefix(`/api/datasets/${historyDatasetId}/display?filename=${path}`);
}

const getDataset = fetcher.path("/api/datasets/{dataset_id}").method("get").create();
export async function getDatasetDetails(id: string) {
const { data } = await getDataset({ dataset_id: id });
return data;
}

0 comments on commit 97fb7c5

Please sign in to comment.