From 679da405b04da98b123a220bd6b46f81a23910d1 Mon Sep 17 00:00:00 2001 From: Giorgio Ravera Date: Thu, 19 Mar 2026 22:54:02 +0100 Subject: [PATCH] Minor changes to about --- backend/routes/about.py | 3 +++ frontend/js/index.js | 9 +++++++-- frontend/js/services.js | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/backend/routes/about.py b/backend/routes/about.py index f053eb9..26ac077 100644 --- a/backend/routes/about.py +++ b/backend/routes/about.py @@ -2,6 +2,7 @@ # Import standard modules from fastapi import APIRouter +from datetime import datetime, timezone # Import local modules from backend.db.config import get_config @@ -19,7 +20,9 @@ router = APIRouter() def about(): return { "app": { + "name": settings.APP_NAME, "version": settings.APP_VERSION, }, "domain": settings.DOMAIN, + "server_time": datetime.now(timezone.utc).isoformat(), } diff --git a/frontend/js/index.js b/frontend/js/index.js index 5ffebca..2c5faf3 100644 --- a/frontend/js/index.js +++ b/frontend/js/index.js @@ -289,6 +289,11 @@ if (restoreModal) { } // ------------------------------------------------------- -// KICKOFF +// Periodic API Check // ------------------------------------------------------- -apiCheck(); +async function periodicTest() { + await apiCheck(); + setTimeout(periodicTest, 10000); +} + +periodicTest(); diff --git a/frontend/js/services.js b/frontend/js/services.js index 0055701..d86492c 100644 --- a/frontend/js/services.js +++ b/frontend/js/services.js @@ -6,7 +6,7 @@ export async function apiCheck() { if (!pill) return; try { - const r = await fetch('/api/health'); + const r = await fetch('/about'); if (r.ok) { pill.textContent = 'API OK'; pill.classList.remove('btn-outline-primary'); -- 2.47.3