refactor(customers): remove legacy route files, fully self-contained

- Delete app/api/v1/admin/customers.py (no backward compatibility)
- Delete app/api/v1/vendor/customers.py (no backward compatibility)
- Remove legacy router aliases from module routes
- Routes now fully self-contained in app/modules/customers/routes/

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-30 23:29:38 +01:00
parent e0b69f5a7d
commit 0a82c846ce
4 changed files with 0 additions and 74 deletions

View File

@@ -1,31 +0,0 @@
# app/api/v1/admin/customers.py
"""
LEGACY LOCATION - Re-exports from module for backwards compatibility.
The canonical implementation is now in:
app/modules/customers/routes/admin.py
This file exists to maintain backwards compatibility with code that
imports from the old location. All new code should import directly
from the module:
from app.modules.customers.routes.admin import admin_router
"""
from app.modules.customers.routes.admin import (
admin_router,
router,
list_customers,
get_customer_stats,
get_customer,
toggle_customer_status,
)
__all__ = [
"admin_router",
"router",
"list_customers",
"get_customer_stats",
"get_customer",
"toggle_customer_status",
]

View File

@@ -1,35 +0,0 @@
# app/api/v1/vendor/customers.py
"""
LEGACY LOCATION - Re-exports from module for backwards compatibility.
The canonical implementation is now in:
app/modules/customers/routes/vendor.py
This file exists to maintain backwards compatibility with code that
imports from the old location. All new code should import directly
from the module:
from app.modules.customers.routes.vendor import vendor_router
"""
from app.modules.customers.routes.vendor import (
vendor_router,
router,
get_vendor_customers,
get_customer_details,
get_customer_orders,
update_customer,
toggle_customer_status,
get_customer_statistics,
)
__all__ = [
"vendor_router",
"router",
"get_vendor_customers",
"get_customer_details",
"get_customer_orders",
"update_customer",
"toggle_customer_status",
"get_customer_statistics",
]

View File

@@ -120,7 +120,3 @@ def toggle_customer_status(
)
db.commit()
return CustomerMessageResponse(message=result["message"])
# Legacy alias for backwards compatibility
router = admin_router

View File

@@ -225,7 +225,3 @@ def get_customer_statistics(
)
return CustomerStatisticsResponse(**stats)
# Legacy alias for backwards compatibility
router = vendor_router