RitehWebTeam / infobip-rimatch

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.
http://rimatch-app.s3-website.eu-central-1.amazonaws.com/
0 stars 1 forks source link

Add fetching matched user by id endpoint #121

Closed andrezz-b closed 4 months ago

andrezz-b commented 4 months ago

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:

@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);
        }
    }