From 0c2bdb3d112589dd735cefdef1a8fabd7db4fa4d Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Tue, 7 Oct 2025 01:21:43 +0300 Subject: [PATCH] feat: update version info structure to use buildDate and commitHash instead of createdAt and gitRevision --- src/backend/routes/api.ts | 4 ++-- src/frontend/src/App.tsx | 8 ++++---- src/frontend/src/types/index.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/backend/routes/api.ts b/src/backend/routes/api.ts index 53abb06..973cf59 100644 --- a/src/backend/routes/api.ts +++ b/src/backend/routes/api.ts @@ -256,8 +256,8 @@ router.get('/version', (_req: Request, res: Response): void => { try { res.json({ version: process.env.APP_VERSION || '1.0.0', - createdAt: process.env.CREATED_AT || 'unknown', - gitRevision: process.env.GIT_REVISION || 'unknown', + buildDate: process.env.CREATED_AT || 'unknown', + commitHash: process.env.GIT_REVISION || 'unknown', service: 'Bitip GeoIP Service', }); } catch (error) { diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index d67989a..2fa994a 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -11,8 +11,8 @@ import { pathCombine } from '@flare/utiliyo'; interface VersionInfo { version: string; - createdAt: string; - gitRevision: string; + buildDate: string; + commitHash: string; service: string; } @@ -90,8 +90,8 @@ const App: React.FC = () => { {versionInfo && (

Version {versionInfo.version} - {versionInfo.createdAt !== 'unknown' && - ` | Released ${new Date(versionInfo.createdAt).toLocaleString()}`} + {versionInfo.buildDate !== 'unknown' && + ` | Released ${new Date(versionInfo.buildDate).toLocaleString()}`}

)} diff --git a/src/frontend/src/types/index.ts b/src/frontend/src/types/index.ts index dba71f2..d88440a 100644 --- a/src/frontend/src/types/index.ts +++ b/src/frontend/src/types/index.ts @@ -67,8 +67,8 @@ export interface IPResponse { export interface VersionInfo { version: string; - createdAt: string; - gitRevision: string; + buildDate: string; + commitHash: string; service: string; }