mirror of
https://dev.azure.com/tstanciu94/PhantomMind/_git/Bitip
synced 2025-10-13 01:52:19 +03:00
feat: update version info structure to use buildDate and commitHash instead of createdAt and gitRevision
This commit is contained in:
parent
11bd4fbe18
commit
0c2bdb3d11
@ -256,8 +256,8 @@ router.get('/version', (_req: Request, res: Response): void => {
|
|||||||
try {
|
try {
|
||||||
res.json({
|
res.json({
|
||||||
version: process.env.APP_VERSION || '1.0.0',
|
version: process.env.APP_VERSION || '1.0.0',
|
||||||
createdAt: process.env.CREATED_AT || 'unknown',
|
buildDate: process.env.CREATED_AT || 'unknown',
|
||||||
gitRevision: process.env.GIT_REVISION || 'unknown',
|
commitHash: process.env.GIT_REVISION || 'unknown',
|
||||||
service: 'Bitip GeoIP Service',
|
service: 'Bitip GeoIP Service',
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -11,8 +11,8 @@ import { pathCombine } from '@flare/utiliyo';
|
|||||||
|
|
||||||
interface VersionInfo {
|
interface VersionInfo {
|
||||||
version: string;
|
version: string;
|
||||||
createdAt: string;
|
buildDate: string;
|
||||||
gitRevision: string;
|
commitHash: string;
|
||||||
service: string;
|
service: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,8 +90,8 @@ const App: React.FC = () => {
|
|||||||
{versionInfo && (
|
{versionInfo && (
|
||||||
<p className="version-info">
|
<p className="version-info">
|
||||||
Version {versionInfo.version}
|
Version {versionInfo.version}
|
||||||
{versionInfo.createdAt !== 'unknown' &&
|
{versionInfo.buildDate !== 'unknown' &&
|
||||||
` | Released ${new Date(versionInfo.createdAt).toLocaleString()}`}
|
` | Released ${new Date(versionInfo.buildDate).toLocaleString()}`}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -67,8 +67,8 @@ export interface IPResponse {
|
|||||||
|
|
||||||
export interface VersionInfo {
|
export interface VersionInfo {
|
||||||
version: string;
|
version: string;
|
||||||
createdAt: string;
|
buildDate: string;
|
||||||
gitRevision: string;
|
commitHash: string;
|
||||||
service: string;
|
service: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user