Skip to content

Remove deprecated personal_data endpoints#841

Open
helylle wants to merge 1 commit intomainfrom
ylle-cleanup-personal-data
Open

Remove deprecated personal_data endpoints#841
helylle wants to merge 1 commit intomainfrom
ylle-cleanup-personal-data

Conversation

@helylle
Copy link
Contributor

@helylle helylle commented Feb 11, 2026

Remove deprecated personal_data endpoints

This PR removes four deprecated/unused personal_data endpoints that have zero frontend or backend callers. All functionality is already provided by newer, more focused endpoints.

Changes

Removed Endpoints

  1. POST /user (deprecated)

    • Replaced by POST /user/name and POST /user/language
    • Already marked with @deprecated decorator
    • Removed route, schema (PersonalDataRequestSchema, PersonalDataSchema, PersonalDataResponseSchema), and 13 tests
  2. GET /user

    • Superseded by GET /all-user-data which returns a superset of data
    • Removed route and 2 tests
  3. GET /identities

    • Data already included in /all-user-data response
    • Removed route, schema (IdentitiesResponseSchema), and 1 test
  4. GET /preferences

    • Data already included in /all-user-data response
    • Removed route and 1 test
    • Inlined get_user_preferences() function body into set_user_preferences() (was only called once, simple one-liner)

Test Helpers Removed

  • _get_user() (2 call sites)
  • _post_user() (13 call sites)
  • _get_preferences() (1 call site)
  • _get_user_identities() (1 call site)

All test functionality is preserved through equivalent tests on the replacement endpoints.

Verification

  • ✅ All 23 remaining tests pass
  • ✅ Code reformatted with ruff (clean)
  • ✅ mypy type checking passes (795 files)
  • ✅ ty type checking passes
  • ✅ No lint errors

Impact

Breaking Change: Yes - removes 4 API endpoints

However, these endpoints have zero callers in the frontend or backend codebase:

  • No production code references found
  • No frontend API calls found
  • Only references were in backend tests that exercised the endpoints themselves

The replacement endpoints (POST /user/name, POST /user/language, GET /all-user-data) have been available and provide all the same functionality with better separation of concerns.

@sonarqubecloud
Copy link

@helylle helylle marked this pull request as ready for review February 11, 2026 10:40
@johanlundberg johanlundberg self-requested a review February 11, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants