Skip to content

Commit

Permalink
feat(website): rename sequences to seq
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasKampmann committed Jan 10, 2024
1 parent e17061d commit a78f82b
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion website/src/components/SequenceDetailsPage/getTableData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function validateDetailsAreNotEmpty<T extends [DetailsResponse, ...any[]]>(acces
title: 'Not Found',
status: 0,
detail: 'No data found for accession version ' + accessionVersion,
instance: '/sequences/' + accessionVersion,
instance: '/seq/' + accessionVersion,
});
}
}
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions website/src/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ export const routes = {
searchPage: <Filter extends FilterValue>(organism: string, searchFilter: Filter[] = [], page: number = 1) =>
withOrganism(organism, `/search?${buildSearchParams(searchFilter, page).toString()}`),
sequencesDetailsPage: (organism: string, accessionVersion: AccessionVersion | string) =>
`/${organism}/sequences/${getAccessionVersionString(accessionVersion)}`,
`/${organism}/seq/${getAccessionVersionString(accessionVersion)}`,
sequencesVersionsPage: (organism: string, accessionVersion: AccessionVersion | string) =>
`/${organism}/sequences/${getAccessionVersionString(accessionVersion)}/versions`,
`/${organism}/seq/${getAccessionVersionString(accessionVersion)}/versions`,
submitPage: (organism: string) => withOrganism(organism, '/submit'),
revisePage: (organism: string) => withOrganism(organism, '/revise'),
editPage: (organism: string, accessionVersion: AccessionVersion) =>
Expand All @@ -26,8 +26,8 @@ export const routes = {
const groupPagePath = `/group/${groupName}` as const;
return groupPagePath;
},
userSequencesPage: (organism: string) => withOrganism(organism, `/user/sequences`),
versionPage: (organism: string, accession: string) => withOrganism(organism, `/sequences/${accession}/versions`),
userSequencesPage: (organism: string) => withOrganism(organism, `/user/seq`),
versionPage: (organism: string, accession: string) => withOrganism(organism, `/seq/${accession}/versions`),
unknownOrganismPage: (organism: string) => `/404?unknownOrganism=${organism}`,
logout: () => '/logout',
};
Expand Down
3 changes: 2 additions & 1 deletion website/src/utils/shouldMiddlewareEnforceLogin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { describe, expect, test } from 'vitest';

import { shouldMiddlewareEnforceLogin } from './shouldMiddlewareEnforceLogin';
import { testOrganism } from '../../vitest.setup.ts';
import { routes } from '../routes.ts';

const otherOrganism = 'otherOrganism';
const configuredOrganisms = [testOrganism, otherOrganism];
Expand All @@ -26,7 +27,7 @@ describe('shouldMiddlewareEnforceLogin', () => {
expectNoLogin(`/${testOrganism}/search`);
expectNoLogin(`/`);
expectNoLogin(`/${testOrganism}`);
expectNoLogin(`/${testOrganism}/sequences/id_002156`);
expectNoLogin(routes.sequencesDetailsPage(testOrganism, 'id_002156'));
});

function expectForceLogin(path: string) {
Expand Down

0 comments on commit a78f82b

Please sign in to comment.