Spaces:
Running
Running
Download sinetti_api/routers/admin_guide_admin.py from Couscouskabyle/iscc-app: direct link, hf CLI and curl.
- Browser
- Download file 882 Bytes
-
https://huggingface.co/spaces/Couscouskabyle/iscc-app/resolve/main/sinetti_api/routers/admin_guide_admin.py
- Command line
-
hf download hf://spaces/Couscouskabyle/iscc-app/sinetti_api/routers/admin_guide_admin.py
-
curl -L -o admin_guide_admin.py https://huggingface.co/spaces/Couscouskabyle/iscc-app/resolve/main/sinetti_api/routers/admin_guide_admin.py
882 Bytes
| """Admin Guide — read the single tracked standalone HTML file, rewritten for in-app serving.""" | |
| from __future__ import annotations | |
| from fastapi import APIRouter | |
| from sinetti_api.schemas import AdminGuideResponse | |
| from sinetti_services import admin_guide_service | |
| router = APIRouter(prefix="/api/admin/guide", tags=["admin_guide_admin"]) | |
| def get_admin_guide() -> AdminGuideResponse: | |
| guide = admin_guide_service.read_guide() | |
| if not guide.html: | |
| return AdminGuideResponse( | |
| ok=False, | |
| html="", | |
| path=guide.path, | |
| updated_at=guide.updated_at, | |
| message="Admin guide is unavailable on this build.", | |
| ) | |
| return AdminGuideResponse( | |
| ok=True, html=guide.html, path=guide.path, updated_at=guide.updated_at, message="" | |
| ) | |