Merge PR #445: Ensure subscription router is always mounted without duplicates

This commit is contained in:
ajaysi
2026-03-30 07:39:33 +05:30
3 changed files with 22 additions and 7 deletions

View File

@@ -289,7 +289,10 @@ if not PODCAST_ONLY_DEMO_MODE:
router_manager.include_optional_routers()
else:
logger.info("PODCAST_ONLY_DEMO_MODE enabled: including only podcast and subscription feature routers.")
app.include_router(subscription_router)
router_manager.include_router_safely(subscription_router, "subscription")
# Safety net: keep subscription routes available even if core inclusion flow changes
# in special modes (e.g., demo mode). De-dup is handled by RouterManager.
router_manager.include_router_safely(subscription_router, "subscription")
# Include assets serving router (must be mounted to serve generated images)
app.include_router(assets_serving_router)