Skip to content

Commit

Permalink
Cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
ramari16 committed Nov 13, 2024
1 parent 2dba108 commit 0062af2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/components/explorer/export/ExportStepper.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,11 @@
return 'ERROR';
}
async function getSignedUrl(urlTemplate: string) {
async function getSignedUrl() {
const path = 'picsure/query/' + datasetId + '/signed-url';
try {
const res = await api.post(path, query);
let url = urlTemplate + encodeURIComponent(res.signedUrl);
window.open(url);
return res.signedUrl;
} catch (error) {
console.error('Error in getSignedUrl', error);
}
Expand Down Expand Up @@ -206,7 +205,8 @@
async function exportToTerra() {
exportLoading = true;
await getSignedUrl("https://app.terra.bio/#import-data?format=pfb&url=");
let signedUrl = await getSignedUrl();
window.open("https://app.terra.bio/#import-data?format=pfb&url=" + encodeURIComponent(signedUrl));
exportLoading = false;
}
</script>
Expand Down

0 comments on commit 0062af2

Please sign in to comment.