diff --git a/main.py b/main.py index fa5ddd54..2bf7caaf 100644 --- a/main.py +++ b/main.py @@ -64,6 +64,7 @@ from app.exceptions.handler import setup_exception_handlers # Module route auto-discovery - all page routes now come from modules from app.modules.routes import ( get_admin_page_routes, + get_merchant_page_routes, get_platform_page_routes, get_storefront_page_routes, get_store_page_routes, @@ -358,6 +359,23 @@ for route_info in admin_page_routes: include_in_schema=route_info.include_in_schema, ) +# ============================================================================= +# MERCHANT PAGES (Merchant billing portal) +# ============================================================================= +logger.info("Auto-discovering merchant page routes...") +merchant_page_routes = get_merchant_page_routes() +logger.info(f" Found {len(merchant_page_routes)} merchant page route modules") + +for route_info in merchant_page_routes: + prefix = f"/merchants{route_info.custom_prefix}" if route_info.custom_prefix else "/merchants" + logger.info(f" Registering {route_info.module_code} merchant pages at {prefix}") + app.include_router( + route_info.router, + prefix=prefix, + tags=route_info.tags, + include_in_schema=route_info.include_in_schema, + ) + # ============================================================================= # STORE PAGES # ============================================================================= diff --git a/tests/integration/api/v1/loyalty/__init__.py b/tests/integration/api/v1/loyalty/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/unit/models/database/__init__.py b/tests/unit/models/database/__init__.py deleted file mode 100644 index 5e3668c5..00000000 --- a/tests/unit/models/database/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# tests/unit/models/database/__init__.py -"""Database model unit tests."""