refactor(users): remove dead analytics endpoints and consolidate into profile
requested to merge gunapavan/corpus-server-app:refactor/remove-dead-user-analytics-endpoints into main
Summary
- Removed 3 dead endpoints with zero consumers (frontend, CLI, and tests show no usage):
GET /{id}/edit-activityGET /{id}/edit-metricsGET /{id}/activity-summary
- Added
average_edits_per_recordtoGET /{id}/profile?include=summaryundersummary.edits— the only field not already present in the profile endpoint - Removed
UserEditActivityandUserEditMetricsschemas fromrecord_history.pyand__init__.py - Net result: -163 lines, no data loss, no breaking changes
Test plan
-
GET /{id}/profile?include=summary→summary.edits.average_edits_per_recordpresent -
GET /{id}/edit-activity→404 Not Found -
GET /{id}/edit-metrics→404 Not Found -
GET /{id}/activity-summary→404 Not Found
Checklist
-
Code follows project API guidelines -
Documentation is updated (OpenAPI docs reflect removed endpoints) -
Code adheres to project coding standards
Closes #121