fix: remove the duplicate team-sessions/create registration — Closes #203 - #208
Merged
harsharajkumar-273 merged 1 commit intoAug 9, 2026
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (1)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2026-07-24T17:54:49.155ZApplied to files:
🔇 Additional comments (1)
📝 WalkthroughWalkthroughThe team session controller now handles requests without a body. The duplicate authenticated creation route is removed from the system router, leaving team-session joining available. ChangesTeam session route cleanup
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
harsharajkumar-273
approved these changes
Aug 9, 2026
harsharajkumar-273
merged commit Aug 9, 2026
7825a05
into
harsharajkumar-273:main
1 of 2 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #203
The issue got one thing wrong, and it changes the fix
I wrote that the two implementations were "currently equivalent". They are not, and the difference matters:
system.routes.tsteam.controller.tsreq.body || {}req.bodytry/catch→ 500express.json()leavesreq.bodyundefined when theContent-Typeis not JSON. So deleting the system handler as the issue proposed, without porting its guard, does this:A 400 becomes a 500 on a malformed request — a regression introduced by a change whose whole purpose was removing dead code.
What this does
Ports the guard into the controller first, with a comment recording why it is there, so it does not get stripped back out as noise:
Then removes the unreachable registration at
system.routes.ts:94-116.The controller keeps its two advantages — the more specific 400 message and the
try/catchthat turns a store failure into a 500 rather than an unhandled rejection.Why the controller is the one to keep
team.routes.tsplusteam.controller.tsis where the name says the logic lives, and it leavessystem.routes.tsfor genuinely system-level concerns.team.routes.tsalso registersGET /team-sessions/:code, which is not duplicated and does work — so the file was never dead, only half-reachable.One consequence worth noting
isValidTeamRepobecame an unused import insystem.routes.tsonce the handler went, and is removed.teamSessionStoreandnormalizeTeamSessionCodeare still used there by theGEThandler and stay.Verified
POST /team-sessions/createstill resolves — now only throughteam.routes.tsnpx tsc --noEmit: 1 error, unchanged frommain— the pre-existingPrismaClientresolution failurebackend/dev.dbuntouchedFollow-up
The issue suggested checking for other duplicate registrations. I have not done that here — it wants a systematic pass over every router's mount order rather than a grep, and it does not belong in the same change as this fix. Worth its own issue if you want it.
Summary by CodeRabbit
Bug Fixes
Changes