feat: update version info structure to use buildDate and commitHash instead of createdAt and gitRevision

This commit is contained in:
Tudor Stanciu 2025-10-07 01:21:43 +03:00
parent 11bd4fbe18
commit 0c2bdb3d11
3 changed files with 8 additions and 8 deletions

View File

@ -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) {

View File

@ -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 && (
<p className="version-info">
Version {versionInfo.version}
{versionInfo.createdAt !== 'unknown' &&
` | Released ${new Date(versionInfo.createdAt).toLocaleString()}`}
{versionInfo.buildDate !== 'unknown' &&
` | Released ${new Date(versionInfo.buildDate).toLocaleString()}`}
</p>
)}
</footer>

View File

@ -67,8 +67,8 @@ export interface IPResponse {
export interface VersionInfo {
version: string;
createdAt: string;
gitRevision: string;
buildDate: string;
commitHash: string;
service: string;
}