mirror of
https://github.com/blackboxprogramming/BlackRoad-Operating-System.git
synced 2026-03-17 06:57:17 -05:00
Merge branch origin/codex/implement-unified-status-page-for-apis-8w9cw1 into main
This commit is contained in:
@@ -5,6 +5,7 @@ from fastapi.responses import JSONResponse, FileResponse
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
from contextlib import asynccontextmanager
|
||||
import time
|
||||
from datetime import datetime, timezone
|
||||
import os
|
||||
|
||||
from app.config import settings
|
||||
@@ -229,8 +230,22 @@ else:
|
||||
async def health_check():
|
||||
"""Health check endpoint"""
|
||||
return {
|
||||
"service": "core-api",
|
||||
"status": "healthy",
|
||||
"timestamp": time.time()
|
||||
"environment": settings.ENVIRONMENT,
|
||||
"version": settings.APP_VERSION,
|
||||
"timestamp": datetime.now(timezone.utc).isoformat()
|
||||
}
|
||||
|
||||
|
||||
@app.get("/version")
|
||||
async def version():
|
||||
"""Service version endpoint"""
|
||||
return {
|
||||
"service": "core-api",
|
||||
"version": settings.APP_VERSION,
|
||||
"environment": settings.ENVIRONMENT,
|
||||
"timestamp": datetime.now(timezone.utc).isoformat(),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user