Skip to content

Releases: flutter-news-app-full-source-code/flutter-news-app-api-server-full-source-code

04-07-2025

04 Jul 18:08
25c873a
Compare
Choose a tag to compare
04-07-2025 Pre-release
Pre-release

🚀 API Enhancements: Dashboard Summary & Flexible Sorting

This release significantly enhances our API, introducing a new dedicated endpoint to power the dashboard and implementing a powerful, flexible sorting mechanism across all major data endpoints. These changes provide richer data for monitoring and give clients greater control over how data is presented.

✨ New Features & Enhancements

  • New Dashboard Summary API: This provides real-time, aggregated counts of key entities like headlines, categories, and sources, specifically designed to power the new dashboard overview page in the front-end application.

  • Flexible Data Sorting: List endpoints now support dynamic sorting. Clients can use the sortBy and sortOrder (asc or desc) query parameters to control the order of returned data. This feature has been implemented across all major data models (headlines, categories, sources, users, etc.) for consistent and powerful data control.

🔧 Under the Hood

  • Dashboard Summary Service: A new DashboardSummaryService has been implemented to handle the logic for calculating and providing dashboard metrics efficiently.
  • Robust Sorting Implementation: The new sorting capability includes validation to ensure only valid sort orders are accepted, returning a BadRequestException for invalid inputs.
  • Dependency Injection & Model Registration: The new service has been integrated into the application's dependency injection system, and the DashboardSummary model has been registered with read-only permissions for administrators.