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:
@@ -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",
|
|
||||||
]
|
|
||||||
35
app/api/v1/vendor/customers.py
vendored
35
app/api/v1/vendor/customers.py
vendored
@@ -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",
|
|
||||||
]
|
|
||||||
@@ -120,7 +120,3 @@ def toggle_customer_status(
|
|||||||
)
|
)
|
||||||
db.commit()
|
db.commit()
|
||||||
return CustomerMessageResponse(message=result["message"])
|
return CustomerMessageResponse(message=result["message"])
|
||||||
|
|
||||||
|
|
||||||
# Legacy alias for backwards compatibility
|
|
||||||
router = admin_router
|
|
||||||
|
|||||||
@@ -225,7 +225,3 @@ def get_customer_statistics(
|
|||||||
)
|
)
|
||||||
|
|
||||||
return CustomerStatisticsResponse(**stats)
|
return CustomerStatisticsResponse(**stats)
|
||||||
|
|
||||||
|
|
||||||
# Legacy alias for backwards compatibility
|
|
||||||
router = vendor_router
|
|
||||||
|
|||||||
Reference in New Issue
Block a user