RiMatch is a dating application which helps users find connections by creating profiles, matching them with others based on preferences, and enabling communication through chat.
Add a backend endpoint which fetches a matched user by id.
The endpoint should also check if the user making the request is actually matched with that user.
Something similar to this but for id:
@GetMapping("/{email}")
public ResponseEntity<User> getUserByEmail(@PathVariable String email) {
User user = userService.getUserByEmail(email);
if (user != null) {
return new ResponseEntity<>(user, HttpStatus.OK);
} else {
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
}
}
Description
Add a backend endpoint which fetches a matched user by id. The endpoint should also check if the user making the request is actually matched with that user.
Something similar to this but for id: