Skip to content

Commit

Permalink
Add window location to dataset url
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Nov 27, 2024
1 parent 0da7fbc commit 2a42930
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/api/datasets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
}
2 changes: 1 addition & 1 deletion src/components/GalaxyCharts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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}.`);
}
}
Expand Down

0 comments on commit 2a42930

Please sign in to comment.