Skip to content

Add missing API routes for stats endpoints#38

Merged
alex-dembele merged 1 commit intomasterfrom
backend/missing-api-routes
Jan 6, 2026
Merged

Add missing API routes for stats endpoints#38
alex-dembele merged 1 commit intomasterfrom
backend/missing-api-routes

Conversation

@alex-dembele
Copy link
Copy Markdown
Member

  • GET /stats/risk-distribution: Returns risk distribution by severity level
  • GET /stats/mitigation-metrics: Returns mitigation statistics and completion rate
  • GET /stats/top-vulnerabilities: Returns top critical risks

These endpoints were being called by the frontend but were not registered in the backend router.

Fixes:

  • RiskDistribution.tsx can now fetch risk distribution data
  • AverageMitigationTime.tsx can now fetch mitigation metrics
  • TopVulnerabilities.tsx can now fetch critical vulnerabilities

Note: /threats/stats was already registered and working correctly.

- GET /stats/risk-distribution: Returns risk distribution by severity level
- GET /stats/mitigation-metrics: Returns mitigation statistics and completion rate
- GET /stats/top-vulnerabilities: Returns top critical risks

These endpoints were being called by the frontend but were not registered in the backend router.

Fixes:
- RiskDistribution.tsx can now fetch risk distribution data
- AverageMitigationTime.tsx can now fetch mitigation metrics
- TopVulnerabilities.tsx can now fetch critical vulnerabilities

Note: /threats/stats was already registered and working correctly.
@alex-dembele alex-dembele added invalid This doesn't seem right frontend frontend update labels Jan 6, 2026
@alex-dembele alex-dembele merged commit 74b5fe6 into master Jan 6, 2026
@alex-dembele alex-dembele deleted the backend/missing-api-routes branch January 6, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend frontend update invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant