Code Room
Code reviewMedium
Question
Review this Java registration endpoint.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
@PostMapping("/register")public ResponseEntity<User> register(@RequestBody RegisterReq req) { User u = new User(req.getEmail(), hash(req.getPassword())); userRepo.save(u); // unique constraint on email return ResponseEntity.ok(u);}Run or narrate your approach, then ask the coach.