udpate: web populate fix
Local Docker Build (Dev) / build-dev (push) Successful in 5s

This commit is contained in:
2025-11-03 10:54:06 -05:00
parent de2203a53d
commit c91c33e9b2
4 changed files with 15 additions and 6 deletions
+10 -1
View File
@@ -1258,9 +1258,12 @@ def register_web_routes(app, dependencies):
return {"status": "logged_out", "message": "Session cleared"}
# Database population endpoints
print("🔧 DEBUG: Registering /admin/populate-database endpoint...")
@app.post("/admin/populate-database")
async def api_populate_database(request: Request, background_tasks: BackgroundTasks):
"""Populate database from Radarr/Sonarr"""
print(f"🔥 DEBUG: populate-database endpoint called!")
try:
data = await request.json()
media_type = data.get("media_type", "both")
@@ -1269,6 +1272,8 @@ def register_web_routes(app, dependencies):
media_type = request.query_params.get("media_type", "both")
return await populate_database(background_tasks, media_type, dependencies)
print("✅ DEBUG: /admin/populate-database registered")
@app.get("/api/populate/status")
async def api_populate_status():
"""Get database population status"""
@@ -1280,4 +1285,8 @@ def register_web_routes(app, dependencies):
"""Health check endpoint for container monitoring"""
return {"status": "healthy", "service": "nfoguard-web"}
print("✅ Web routes registered successfully")
print("✅ Web routes registered successfully")
print(f"📋 DEBUG: Registered routes count: {len(app.routes)}")
for route in app.routes:
if hasattr(route, 'path') and hasattr(route, 'methods'):
print(f" - {route.methods} {route.path}")