diff --git a/kubernetes/loculus/values.yaml b/kubernetes/loculus/values.yaml index 26e712233..17470011e 100644 --- a/kubernetes/loculus/values.yaml +++ b/kubernetes/loculus/values.yaml @@ -1275,6 +1275,9 @@ defaultOrganisms: schema: image: "https://www.un.org/sites/un2.un.org/files/field/image/1583952355.1997.jpg" organismName: "Test Dummy Organism" + metadataTemplate: + - country + - date metadata: - name: date type: date diff --git a/website/src/config.ts b/website/src/config.ts index dee61b9e2..54df07cae 100644 --- a/website/src/config.ts +++ b/website/src/config.ts @@ -69,8 +69,11 @@ export function getSchema(organism: string): Schema { } export function getMetadataTemplateFields(organism: string): string[] { + const schema = getConfig(organism).schema; + if (schema.metadataTemplate !== undefined) { + return schema.metadataTemplate; + } return getConfig(organism).schema.inputFields.map((field) => field.name); - // TODO } export function getRuntimeConfig(): RuntimeConfig { diff --git a/website/src/pages/[organism]/submission/template/index.ts b/website/src/pages/[organism]/submission/template/index.ts index acc50368b..513eee960 100644 --- a/website/src/pages/[organism]/submission/template/index.ts +++ b/website/src/pages/[organism]/submission/template/index.ts @@ -5,6 +5,7 @@ import type { UploadAction } from '../../../../components/Submission/DataUploadF import { getMetadataTemplateFields } from '../../../../config'; import { ACCESSION_FIELD, SUBMISSION_ID_FIELD } from '../../../../settings.ts'; +/** The TSV template file that users can download from the submission page. */ export const GET: APIRoute = async ({ params, request }) => { const rawOrganism = params.organism!; const { organism } = cleanOrganism(rawOrganism);