Skip to content

Commit

Permalink
move file
Browse files Browse the repository at this point in the history
  • Loading branch information
fhennig authored and corneliusroemer committed Oct 17, 2024
1 parent 3f5f678 commit 0b05af3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion website/src/pages/seq/[accessionVersion].fa/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/seq/[accessionVersion].tsv/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -104,6 +104,7 @@ const getSequenceDataWithOrganism = async (

const dataResult: Result<string, ProblemDetail> = await getter(accessionVersion, organism);

// the result might be 'ok' but empty.
if (dataResult.isOk()) {
if (dataResult.value.trim().length === 0) {
return err({
Expand Down

0 comments on commit 0b05af3

Please sign in to comment.