Package restapi.controllers
Class MatchController
java.lang.Object
restapi.controllers.MatchController
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @NonNull MatchRequestService
private final @NonNull MatchService
private final @NonNull UserService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<RestResponse>
getActiveMatches
(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/activeorg.springframework.http.ResponseEntity<RestResponse>
Get user's match requests that have been accepted by both users endpoint /matches/fulfilled
-
Field Details
-
userService
-
matchService
-
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
-