Skip to content

Re-apply v1 endpoint removal (#207) onto main#210

Merged
jenul-ferdinand merged 3 commits into
mainfrom
refactor/v1-drop-dead-endpoints
Jul 5, 2026
Merged

Re-apply v1 endpoint removal (#207) onto main#210
jenul-ferdinand merged 3 commits into
mainfrom
refactor/v1-drop-dead-endpoints

Conversation

@jenul-ferdinand

Copy link
Copy Markdown
Member

Removes the v1 endpoints that already have v2 replacements, so the remaining v1 surface is only what still needs migrating.

This lands the dead-endpoint removal that #208's checklist assumes is already in. The work was done in #207 but that merged into the stacking branch refactor/v1-routes-into-domains, which never reached main. These three commits are cherry-picked onto current main so the diff is backend-only, with none of that stale branch's unrelated skills deletions.

What drops

  • reviews: getAll, getByUnit, getUserReviews, create, update, delete, toggle-reaction. Keeps send-report (no v2 yet).
  • units: list, popular, filter.
  • users/auth: google-auth, validate-session, upload-avatar.

Also removes the now-unused repository methods and the v1 popular-units performance test.

Not in scope

Verification

  • npx tsc --noEmit: no errors
  • npx vitest run --project services --project integration: 14 files, 59 tests pass

Unblocks #208.

Copilot AI review requested due to automatic review settings July 5, 2026 22:39
@jenul-ferdinand jenul-ferdinand self-assigned this Jul 5, 2026
@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
monstar Ready Ready Preview, Comment Jul 5, 2026 10:40pm

@jenul-ferdinand jenul-ferdinand changed the title Drop v1 endpoints superseded by v2 Re-apply v1 endpoint removal (#207) onto main Jul 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes legacy v1 backend endpoints that are now superseded by existing v2 replacements, with the goal of shrinking the remaining /api/v1 surface area to only what still needs migration (per #208). It also deletes now-unused v1-specific service/repository code paths and updates characterization/performance tests accordingly.

Changes:

  • Removed v1 routes for reviews (list/read/create/update/delete/toggle-reaction), units (list/popular/filter), and auth/users (google-auth, validate-session, upload-avatar), keeping only still-needed v1 endpoints (e.g., reviews send-report; auth refresh/logout; units unit-by-code/required-by; admin ops).
  • Deleted v1-only service/repository methods that were exclusively used by the removed endpoints.
  • Retired the v1 /units/popular artillery baseline and converted the perf test to a v2-only “all requests must succeed” load smoke test; consolidated v1 reviews tests to only cover the remaining send-report endpoint.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.

Show a summary per file
File Description
backend/src/shared/testing/performance/v1.units.popular.yml Removed artillery scenario for the deleted v1 /units/popular endpoint.
backend/src/shared/testing/performance/v1.units.popular.report.json Removed stored v1 artillery report tied to the deleted endpoint.
backend/src/shared/testing/performance/units.api.test.ts Updated perf test from v1-vs-v2 comparison to v2-only load smoke assertions.
backend/src/domains/identity/users/user.v1.service.ts Removed v1-only Google auth / validate / avatar logic; kept only remaining v1 user-management orchestration.
backend/src/domains/identity/users/user.repository.ts Removed repository methods that were only used by the deleted v1 auth flows.
backend/src/domains/identity/users/auth.v1.routes.ts Removed routes for deprecated v1 auth endpoints; left refresh/logout and legacy admin/user-management routes.
backend/src/domains/identity/users/auth.v1.controller.ts Removed controller handlers for deleted v1 auth endpoints; retained refresh/logout and legacy user-management handlers.
backend/src/domains/identity/users/auth.v1.api.test.ts Removed characterization coverage for deleted v1 auth endpoints; retained refresh/logout coverage.
backend/src/domains/academics/units/units.v1.routes.ts Removed v1 units list/popular/filter routes; kept unit-by-code/required-by and admin ops.
backend/src/domains/academics/units/units.v1.api.test.ts Removed characterization tests for deleted v1 units endpoints; kept tests for remaining read endpoints.
backend/src/domains/academics/units/unit.v1.service.ts Removed v1 service methods only used by deleted endpoints (all/popular/filter).
backend/src/domains/academics/units/unit.v1.controller.ts Removed v1 controller handlers for deleted endpoints (all/popular/filter).
backend/src/domains/academics/units/unit.repository.ts Removed the v1-only filtered-with-reviews aggregation helper.
backend/src/domains/academics/reviews/reviews.v1.write.api.test.ts Deleted v1 write endpoint characterization suite that covered removed endpoints.
backend/src/domains/academics/reviews/reviews.v1.read.api.test.ts Deleted v1 read endpoint characterization suite that covered removed endpoints.
backend/src/domains/academics/reviews/reviews.v1.api.test.ts Added a focused characterization suite for the remaining v1 send-report endpoint.
backend/src/domains/academics/reviews/review.v1.service.ts Deleted v1 reviews business-logic service now that the corresponding endpoints are removed.
backend/src/domains/academics/reviews/review.v1.controller.ts Removed handlers for deleted v1 review endpoints; retained sendReport.
backend/src/domains/academics/reviews/review.repository.ts Removed repository helpers that were only used by the deleted v1 review flows.
backend/src/domains/academics/reviews/index.ts Removed export of the deleted ReviewV1Service.
backend/src/domains/academics/reviews/reviews.v1.routes.ts Removed v1 routes for deleted review endpoints; kept only send-report.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jenul-ferdinand jenul-ferdinand merged commit 17d3ab3 into main Jul 5, 2026
3 checks passed
@jenul-ferdinand jenul-ferdinand deleted the refactor/v1-drop-dead-endpoints branch July 5, 2026 22:42
jenul-ferdinand added a commit that referenced this pull request Jul 5, 2026
Drop frontend service methods whose v1 backend endpoints were removed in
#210. All were self-only with no live callers; the live auth flows use the
v2 user.service.ts, not these auth.service.ts copies.

- api.service.ts: getAllReviewsGET, getUserReviewsGET, toggleReactionPATCH,
  getAllUnits, getUnitsFilteredGET, createReviewForUnitPOST,
  deleteReviewByIdDELETE, editReviewPUT (and the now-unused HttpParams import)
- auth.service.ts: googleAuthenticate, validateSession, uploadAvatar
- setu.service.ts: getAllSetu, getAverageSetuScores, getSetuBySeason
@jenul-ferdinand jenul-ferdinand added the refactor Restructure or clean up code without changing behaviour. Covers tech debt. label Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend refactor Restructure or clean up code without changing behaviour. Covers tech debt.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants