Language: TypeScript. The pull request has one bug. You get three tries to find the line, then a short debrief.
The API becomes stateless: instead of a session lookup we read the user id and role from a signed JWT in the Authorization header. Tokens are valid for one hour.
Codetrap needs JavaScript: the code review happens in your browser.