Spaces:
Sleeping
Sleeping
Update app/routers/base.py
Browse files12345678910111213141516171819202122from fastapi import APIRouterfrom app.core.cache import last_update_isofrom app.core.config import Configrouter = APIRouter()@router.get("/health")def health():return {"ok": True,"repo": Config.HF_DATASET_REPO,"file": Config.PRED_LATEST,"last_update": last_update_iso(),}@router.get("/")def home():return {"message": "🚀 Pegos Data API aktif","endpoints": ["/health", "/latest", "/history", "/signal", "/predictions"],"dataset": Config.HF_DATASET_REPO,}12345678910111213from fastapi.responses import JSONResponsefrom app.core.config import Configfrom app.core.cache import last_update_iso@router.get("/")def home():data = {"message": "🚀 Pegos Data API aktif","endpoints": ["/health", "/latest", "/history", "/signal", "/predictions"],"dataset": Config.HF_DATASET_REPO,"last_update": last_update_iso(),}return JSONResponse(content=data, media_type="application/json; charset=utf-8")
app/routers/base.py+6-15