Class MatchController

java.lang.Object
restapi.controllers.MatchController

@RestController @RequestMapping("/matches") public class MatchController extends Object
  • Field Details

    • userService

      @NonNull private final @NonNull UserService userService
    • matchService

      @NonNull private final @NonNull MatchService matchService
    • matchRequestService

      @NonNull private final @NonNull MatchRequestService matchRequestService
  • Constructor Details

    • MatchController

      public MatchController()
  • Method Details

    • getActiveMatches

      @GetMapping("/active") public org.springframework.http.ResponseEntity<RestResponse> getActiveMatches(@AuthenticationPrincipal LoggedUser user)
      Returns sent and received match requests with the details of the contact in the match, and a list of matches not requested endpoint /matches/active
      Parameters:
      user - Authenticated LoggedUser from token
      Returns:
      Lists of sent and received match requests and unrequested matches
    • getFulfilledMatches

      @GetMapping("/fulfilled") public org.springframework.http.ResponseEntity<RestResponse> getFulfilledMatches(@AuthenticationPrincipal LoggedUser user)
      Get user's match requests that have been accepted by both users endpoint /matches/fulfilled
      Parameters:
      user - Authenticated LoggedUser from token
      Returns:
      Lists of fulfilled match requests