Skip to content

Add new endpoint related to Pie Chart

KUNAL KUMAR requested to merge add_endpoint_pie_chart into main

Summary by Bito

This pull request adds new API endpoints for pie chart data visualization, enabling clients to retrieve overall activity distribution data, specific category breakdowns, and summary statistics through dedicated routes.

Detailed Changes
  • Introduces pie chart endpoints without input validation in handlePieChartCategory function, potentially allowing invalid category parameters
  • Adds controller functions that lack error handling for data retrieval failures, risking unhandled exceptions
  • Creates pieChartService.js with incorrect average calculation in handlePieChartSummary
  • Extends metricsRoutes.js to include new pie chart routes (/pie, /pie/category/:category, /pie/summary)
Edited by KUNAL KUMAR

Merge request reports