You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If any list in the response is empty (e.g., no monthly revenue data or no top products), return an empty array for that field rather than omitting it. For example:
Description
Implement a backend API endpoint to provide data for the admin dashboard page, displaying key metrics and product sales data.
Acceptance Criteria (Backend)
/api/v1/admin_dashboard
is implemented and accessibleFeatures
Purpose
Create an API endpoint that returns all necessary data for the dashboard in a single request.
Proposed API Endpoint
GET /api/v1/admin_dashboard
Expected Response
Status Code: 200 OK
Content-Type: application/json
Body:
Handling Empty Lists
If any list in the response is empty (e.g., no monthly revenue data or no top products), return an empty array for that field rather than omitting it. For example:
Unit Testing Requirements
Implement comprehensive unit tests for the dashboard API. Tests should cover:
Additional Considerations
The text was updated successfully, but these errors were encountered: