diff --git a/website/src/pages/seq/[accessionVersion].fa/index.ts b/website/src/pages/seq/[accessionVersion].fa/index.ts index 7a4bec632..ece092572 100644 --- a/website/src/pages/seq/[accessionVersion].fa/index.ts +++ b/website/src/pages/seq/[accessionVersion].fa/index.ts @@ -3,7 +3,7 @@ import type { APIRoute } from 'astro'; import { getReferenceGenomes } from '../../../config.ts'; import { routes } from '../../../routes/routes.ts'; import { LapisClient } from '../../../services/lapisClient.ts'; -import { createDownloadAPIRoute } from '../sequenceDownload.ts'; +import { createDownloadAPIRoute } from '../../../utils/createDownloadAPIRoute.ts'; export const GET: APIRoute = createDownloadAPIRoute( 'text/x-fasta', diff --git a/website/src/pages/seq/[accessionVersion].tsv/index.ts b/website/src/pages/seq/[accessionVersion].tsv/index.ts index 78d15b9e7..1b6de3e00 100644 --- a/website/src/pages/seq/[accessionVersion].tsv/index.ts +++ b/website/src/pages/seq/[accessionVersion].tsv/index.ts @@ -2,7 +2,7 @@ import type { APIRoute } from 'astro'; import { routes } from '../../../routes/routes'; import { LapisClient } from '../../../services/lapisClient'; -import { createDownloadAPIRoute } from '../sequenceDownload'; +import { createDownloadAPIRoute } from '../../../utils/createDownloadAPIRoute'; export const GET: APIRoute = createDownloadAPIRoute( 'text/tab-separated-values', diff --git a/website/src/pages/seq/sequenceDownload.ts b/website/src/utils/createDownloadAPIRoute.ts similarity index 94% rename from website/src/pages/seq/sequenceDownload.ts rename to website/src/utils/createDownloadAPIRoute.ts index 848221451..e41f3419b 100644 --- a/website/src/pages/seq/sequenceDownload.ts +++ b/website/src/utils/createDownloadAPIRoute.ts @@ -1,10 +1,10 @@ import type { APIRoute } from 'astro'; import { err, type Result } from 'neverthrow'; -import { getConfiguredOrganisms } from '../../config'; -import { LapisClient } from '../../services/lapisClient'; -import { type ProblemDetail } from '../../types/backend'; -import { parseAccessionVersionFromString } from '../../utils/extractAccessionVersion'; +import { parseAccessionVersionFromString } from './extractAccessionVersion'; +import { getConfiguredOrganisms } from '../config'; +import { LapisClient } from '../services/lapisClient'; +import { type ProblemDetail } from '../types/backend'; export type RedirectRoute = ( accessionVersion: @@ -104,6 +104,7 @@ const getSequenceDataWithOrganism = async ( const dataResult: Result = await getter(accessionVersion, organism); + // the result might be 'ok' but empty. if (dataResult.isOk()) { if (dataResult.value.trim().length === 0) { return err({