diff --git a/package.json b/package.json index 42a506d..59de3c1 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "charts" ], "license": "MIT", - "version": "0.0.38", + "version": "0.0.40", "type": "module", "main": "./dist/galaxy-charts.umd.cjs", "module": "./dist/galaxy-charts.js", diff --git a/src/api/datasets.ts b/src/api/datasets.ts index 5596cdb..de77e5c 100644 --- a/src/api/datasets.ts +++ b/src/api/datasets.ts @@ -27,6 +27,6 @@ export async function datasetsGetColumns(datasetId: string, columnList: string[] } } -export function datasetsGetUrl(datasetId: string): string { - return `/api/datasets/${datasetId}/display`; +export function datasetsGetUrl(root: string, datasetId: string): string { + return `${window.location.origin}${root}api/datasets/${datasetId}/display`; } diff --git a/src/components/GalaxyCharts.vue b/src/components/GalaxyCharts.vue index 7118911..eb181bc 100644 --- a/src/components/GalaxyCharts.vue +++ b/src/components/GalaxyCharts.vue @@ -67,7 +67,7 @@ if (visualizationConfig.dataset_url) { if (!datasetId) { errorMessage.value = "Visualization requires `dataset_id` or `dataset_url`."; } else { - datasetUrl.value = datasetsGetUrl(datasetId); + datasetUrl.value = datasetsGetUrl(root, datasetId); console.debug(`GalaxyCharts: Built dataset url from dataset id: ${datasetUrl.value}.`); } }