Skip to content

Commit

Permalink
Fix empty token in xconsortia download headers
Browse files Browse the repository at this point in the history
  • Loading branch information
axdanbol committed Mar 11, 2024
1 parent d7e47f2 commit 02b573b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/xconsortia/downloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ export class XConsortiaDownloader {
}

const url = new URL(`${dataset.uuid}/expr.h5ad`, this.assetsUrl);
url.searchParams.set('token', this.token);
const headers = {};
if (this.token) {
headers['Authorization'] = `Bearer ${this.token}`;
}

await downloadFile(dataset.dataFilePath, url, {
headers: {
Authorization: `Bearer ${this.token}`,
},
headers,
overwrite: this.config.get(FORCE, false),
});

Expand Down

0 comments on commit 02b573b

Please sign in to comment.