feat: add version information component and integrate version check in health API

This commit is contained in:
Arunavo Ray
2025-05-22 18:51:11 +05:30
parent 0c596ac241
commit 309f8c4341
4 changed files with 121 additions and 13 deletions

View File

@@ -94,6 +94,8 @@ export interface HealthResponse {
status: "ok" | "error";
timestamp: string;
version: string;
latestVersion: string;
updateAvailable: boolean;
database: {
connected: boolean;
message: string;
@@ -147,6 +149,8 @@ export const healthApi = {
timestamp: new Date().toISOString(),
error: error instanceof Error ? error.message : "Unknown error checking health",
version: "unknown",
latestVersion: "unknown",
updateAvailable: false,
database: { connected: false, message: "Failed to connect to API" },
system: {
uptime: { startTime: "", uptimeMs: 0, formatted: "N/A" },