From 2aabfc56590c3869a0cce85135821b74e68972c3 Mon Sep 17 00:00:00 2001 From: Filippo Ledda Date: Fri, 10 May 2024 16:32:49 +0200 Subject: [PATCH] Add auto date to download citation --- applications/portal/backend/main.py | 2 +- .../portal/frontend/src/components/DownloadPage.tsx | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/applications/portal/backend/main.py b/applications/portal/backend/main.py index e0848c13..510ead57 100644 --- a/applications/portal/backend/main.py +++ b/applications/portal/backend/main.py @@ -160,7 +160,7 @@ def create_antibody(body: AddAntibody) -> None: ) -@prefix_router.get('/antibodies/export', response_model=None, tags=['antibody']) +@prefix_router.get('/antibodies/export', response_model=None, tags=['antibody'], dependencies=PROTECTED) def get_antibodies_export() -> None: return antibody_controller.get_antibodies_export() diff --git a/applications/portal/frontend/src/components/DownloadPage.tsx b/applications/portal/frontend/src/components/DownloadPage.tsx index 8af45d73..4c4f81e4 100644 --- a/applications/portal/frontend/src/components/DownloadPage.tsx +++ b/applications/portal/frontend/src/components/DownloadPage.tsx @@ -18,7 +18,11 @@ How to cite this data -* Data was downloaded from the antibodyregistry.org, {access date} RRID:SCR_006397 + * Data was downloaded from the antibodyregistry.org, {new Date().toLocaleDateString('en-US', { + day: '2-digit', + month: 'long', + year: 'numeric', + })} RRID:SCR_006397 License: CC-0