2222public class SubscriptionRestController {
2323 private final SubscriptionService service ;
2424
25- /// Returns all subscriptions for a given userEntity
25+ /// Returns all subscriptions for a given user
2626 ///
27- /// @param user the [CustomUserDetails] of the authenticated userEntity
27+ /// @param user the [CustomUserDetails] of the authenticated user
2828 /// @param pageable the [Pageable] pagination object
2929 /// @param includeUnsubscribed whether to include unsubscribed feeds in the response
30- /// @return a paginated list of subscriptions
30+ /// @return a [ResponseEntity] containing [SubscriptionDTO.SubscriptionPageDTO] objects
3131 @ GetMapping
3232 @ ResponseStatus (HttpStatus .OK )
3333 @ PreAuthorize ("hasRole('USER')" )
@@ -46,10 +46,10 @@ public ResponseEntity<SubscriptionDTO.SubscriptionPageDTO> getAllSubscriptionsFo
4646 return new ResponseEntity <>(SubscriptionDTO .SubscriptionPageDTO .fromPage (dto ), HttpStatus .OK );
4747 }
4848
49- /// Returns a single subscriptionEntity entry by UUID
49+ /// Returns a single subscription entry by UUID
5050 ///
5151 /// @param uuid the UUID value to query for
52- /// @return the subscriptionEntity entity
52+ /// @return a [ResponseEntity] containing a [SubscriptionDTO.UserSubscriptionDTO] object
5353 /// @throws EntityNotFoundException if no entry is found
5454 /// @throws IllegalArgumentException if the UUID is improperly formatted
5555 @ GetMapping ("/{uuid}" )
@@ -60,17 +60,17 @@ public ResponseEntity<SubscriptionDTO.UserSubscriptionDTO> getSubscriptionByUuid
6060 // If the value is invalid, the GlobalExceptionHandler will throw a 400.
6161 UUID uuidValue = UUID .fromString (uuid );
6262
63- // Fetch the subscriptionEntity , throw an EntityNotFoundException if this fails
63+ // Fetch the subscription , throw an EntityNotFoundException if this fails
6464 SubscriptionDTO .UserSubscriptionDTO dto = service .getUserSubscriptionBySubscriptionUuid (uuidValue , user .id ());
6565
6666 // Return the mapped subscriptionEntity entry
6767 return new ResponseEntity <>(dto , HttpStatus .OK );
6868 }
6969
70- /// Updates the subscriptionEntity status of a subscriptionEntity for a given userEntity
70+ /// Updates the subscription status of a subscription for a given user
7171 ///
72- /// @param uuid the UUID of the subscriptionEntity to update
73- /// @return the updated subscriptionEntity entity
72+ /// @param uuid the UUID of the subscription to update
73+ /// @return a [ResponseEntity] containing a [SubscriptionDTO.UserSubscriptionDTO] object
7474 /// @throws EntityNotFoundException if no entry is found
7575 /// @throws IllegalArgumentException if the UUID is improperly formatted
7676 @ PostMapping ("/{uuid}/unsubscribe" )
@@ -86,10 +86,10 @@ public ResponseEntity<SubscriptionDTO.UserSubscriptionDTO> unsubscribeUserFromFe
8686 return new ResponseEntity <>(dto , HttpStatus .OK );
8787 }
8888
89- /// Bulk creates UserSubscriptions for a userEntity . Creates new SubscriptionEntity objects if not already present
89+ /// Bulk creates [UserSubscriptionEntity] objects for a user . Creates new [ SubscriptionEntity] objects if not already present
9090 ///
9191 /// @param request a list of [SubscriptionDTO.SubscriptionCreateDTO] objects
92- /// @return a [SubscriptionDTO.BulkSubscriptionResponseDTO] object
92+ /// @return a [ResponseEntity] containing a [ SubscriptionDTO.BulkSubscriptionResponseDTO] object
9393 @ PostMapping
9494 @ PreAuthorize ("hasRole('USER')" )
9595 public ResponseEntity <SubscriptionDTO .BulkSubscriptionResponseDTO > createUserSubscriptions (@ RequestBody List <SubscriptionDTO .SubscriptionCreateDTO > request , @ AuthenticationPrincipal CustomUserDetails user ) {
0 commit comments