Stats management revamping
This commit is contained in:
@@ -30,8 +30,8 @@ def get_admin_dashboard(
|
||||
"name": "Multi-Tenant Ecommerce Platform",
|
||||
"version": "1.0.0",
|
||||
},
|
||||
"users": admin_service.get_user_statistics(db),
|
||||
"vendors": admin_service.get_vendor_statistics(db),
|
||||
"users": stats_service.get_user_statistics(db),
|
||||
"vendors": stats_service.get_vendor_statistics(db),
|
||||
"recent_vendors": admin_service.get_recent_vendors(db, limit=5),
|
||||
"recent_imports": admin_service.get_recent_import_jobs(db, limit=10),
|
||||
}
|
||||
@@ -82,9 +82,9 @@ def get_platform_statistics(
|
||||
):
|
||||
"""Get comprehensive platform statistics (Admin only)."""
|
||||
return {
|
||||
"users": admin_service.get_user_statistics(db),
|
||||
"vendors": admin_service.get_vendor_statistics(db),
|
||||
"products": admin_service.get_product_statistics(db),
|
||||
"orders": admin_service.get_order_statistics(db),
|
||||
"imports": admin_service.get_import_statistics(db),
|
||||
"users": stats_service.get_user_statistics(db),
|
||||
"vendors": stats_service.get_vendor_statistics(db),
|
||||
"products": stats_service.get_product_statistics(db),
|
||||
"orders": stats_service.get_order_statistics(db),
|
||||
"imports": stats_service.get_import_statistics(db),
|
||||
}
|
||||
Reference in New Issue
Block a user