feat: v9d Phase 2b - Sleep Module Core (Schlaf-Modul)
- Add sleep_log table with JSONB sleep_segments (Migration 009) - Add sleep router with CRUD + stats endpoints (7d avg, 14d debt, trend, phases) - Add SleepPage with quick/detail entry forms and inline edit - Add SleepWidget to Dashboard showing last night + 7d average - Add sleep navigation entry with Moon icon - Register sleep router in main.py - Add 9 new API methods in api.js Phase 2b complete - ready for testing on dev Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
40a4739349
commit
ef81c46bc0
8 files changed
+1050
-3
No files matched your search
+3
-2
@@ -20,7 +20,7 @@ from routers import activity, nutrition, photos, insights, prompts
|
||||
from routers import admin, stats, exportdata, importdata
|
||||
from routers import subscription, coupons, features, tiers_mgmt, tier_limits
|
||||
from routers import user_restrictions, access_grants, training_types, admin_training_types
|
||||
from routers import admin_activity_mappings
|
||||
from routers import admin_activity_mappings, sleep
|
||||
|
||||
# ── App Configuration ─────────────────────────────────────────────────────────
|
||||
DATA_DIR = Path(os.getenv("DATA_DIR", "./data"))
|
||||
@@ -86,10 +86,11 @@ app.include_router(tier_limits.router) # /api/tier-limits (admin)
|
||||
app.include_router(user_restrictions.router) # /api/user-restrictions (admin)
|
||||
app.include_router(access_grants.router) # /api/access-grants (admin)
|
||||
|
||||
# v9d Training Types
|
||||
# v9d Training Types & Sleep Module
|
||||
app.include_router(training_types.router) # /api/training-types/*
|
||||
app.include_router(admin_training_types.router) # /api/admin/training-types/*
|
||||
app.include_router(admin_activity_mappings.router) # /api/admin/activity-mappings/*
|
||||
app.include_router(sleep.router) # /api/sleep/* (v9d Phase 2b)
|
||||
|
||||
# ── Health Check ──────────────────────────────────────────────────────────────
|
||||
@app.get("/")
|
||||
|
||||
Reference in new issue
Block a user