added feeding data objects and workflow
Build and Push Docker Image / build-and-push (pull_request) Successful in 57s
Python Code Quality / python-code-quality (pull_request) Successful in 10s
Python Test / python-test (pull_request) Successful in 17s

This commit is contained in:
Brian Bjarke Jensen
2025-11-09 17:22:37 +01:00
parent 1f48083db8
commit 55de11dcdd
11 changed files with 1104 additions and 8 deletions
+8
View File
@@ -13,6 +13,7 @@ from baby_monitor.routers.auth import router as auth_router
from baby_monitor.routers.auth import verify_token
from baby_monitor.routers.admin import router as admin_router
from baby_monitor.routers.child import router as child_router
from baby_monitor.routers.feeding import router as feeding_router
from baby_monitor.routers.health import router as health_router
from baby_monitor.repositories.dependencies.get_database import init_db
@@ -49,6 +50,7 @@ app.mount("/static", StaticFiles(directory=str(static_path)), name="static")
app.include_router(auth_router)
app.include_router(admin_router)
app.include_router(child_router)
app.include_router(feeding_router)
app.include_router(health_router)
@@ -83,6 +85,12 @@ def serve_add_child() -> FileResponse:
return FileResponse(static_path / "add-child.html")
@app.get("/log-feeding.html", include_in_schema=False)
def serve_log_feeding() -> FileResponse:
"""Serve the log feeding page."""
return FileResponse(static_path / "log-feeding.html")
@app.get("/api/")
def read_root(token: Annotated[str, Depends(verify_token)]) -> dict:
"""API root endpoint (requires authentication)."""