Skip to content

Commit

Permalink
wip: use host for website
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasKellerer committed Dec 14, 2023
1 parent 03e009c commit 7ae5f8a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/data/api-lapis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ import { HostCountSampleEntry } from './sample/HostCountSampleEntry';
import { InsertionCountEntry } from './InsertionCountEntry';
import { NextcladeDatasetInfo } from './NextcladeDatasetInfo';

const HOST = process.env.REACT_APP_LAPIS_HOST;
const ACCESS_KEY = process.env.REACT_APP_LAPIS_ACCESS_KEY;
// TODO: remove this, before merging to master
const HOST = 'http://s1.int.genspectrum.org/gisaid';
const ACCESS_KEY = 'fullTestKey';

// const HOST = process.env.REACT_APP_LAPIS_HOST;
// const ACCESS_KEY = process.env.REACT_APP_LAPIS_ACCESS_KEY;

let currentLapisDataVersion: number | undefined = undefined;

Expand Down Expand Up @@ -76,7 +80,10 @@ export function getCurrentLapisDataVersionDate(): Date | undefined {
}

export async function fetchNextcladeDatasetInfo(signal?: AbortSignal): Promise<NextcladeDatasetInfo> {
let url = '/details';
let url = '/details?limit=1';
if (ACCESS_KEY) {
url += '&accessKey=' + ACCESS_KEY;
}
const response = await get(url, signal, true);
if (!response.ok) {
throw new Error('Error fetching Nextclade dataset info');
Expand Down

0 comments on commit 7ae5f8a

Please sign in to comment.