Files
2026-07-06 10:18:48 +02:00

26 lines
635 B
Python

from pathlib import Path
from fastapi import APIRouter
router = APIRouter()
@router.get("/status")
def bootstrap_status():
privix_path = Path("/privix")
if not privix_path.exists():
return {
"mode": "bootstrap",
"source_attached": False,
"privix_path": None,
"message": "/privix does not exist. Choose create, attach, mount, or restore.",
}
return {
"mode": "bootstrap",
"source_attached": False,
"privix_path": str(privix_path),
"privix_exists": True,
"message": "/privix exists, but is not attached yet.",
}