Class UserStatusController

java.lang.Object
com.espacogeek.geek.controllers.UserStatusController

@Controller public class UserStatusController extends Object
  • Constructor Details

    • UserStatusController

      public UserStatusController()
  • Method Details

    • getUserCustomStatuses

      @QueryMapping(name="getUserCustomStatuses") @PreAuthorize("hasRole(\'user\')") public List<UserCustomStatusModel> getUserCustomStatuses(org.springframework.security.core.Authentication authentication)
      Returns all custom tracking statuses created by the authenticated user.
      Parameters:
      authentication - the currently authenticated user
      Returns:
      list of the user's custom status labels
    • createUserCustomStatus

      @MutationMapping(name="createUserCustomStatus") @PreAuthorize("hasRole(\'user\')") public UserCustomStatusModel createUserCustomStatus(@Argument(name="name") String name, org.springframework.security.core.Authentication authentication)
      Creates a new custom tracking status label for the authenticated user.
      Parameters:
      name - the label for the custom status (e.g. "Re-watching")
      authentication - the currently authenticated user
      Returns:
      the newly created custom status
    • updateUserCustomStatus

      @MutationMapping(name="updateUserCustomStatus") @PreAuthorize("hasRole(\'user\')") public UserCustomStatusModel updateUserCustomStatus(@Argument(name="id") Integer id, @Argument(name="name") String name, org.springframework.security.core.Authentication authentication)
      Updates the name of an existing custom tracking status owned by the authenticated user.
      Parameters:
      id - the ID of the custom status to update
      name - the new label
      authentication - the currently authenticated user
      Returns:
      the updated custom status
    • deleteUserCustomStatus

      @MutationMapping(name="deleteUserCustomStatus") @PreAuthorize("hasRole(\'user\')") public Boolean deleteUserCustomStatus(@Argument(name="id") Integer id, org.springframework.security.core.Authentication authentication)
      Deletes a custom tracking status owned by the authenticated user.
      Parameters:
      id - the ID of the custom status to delete
      authentication - the currently authenticated user
      Returns:
      true if deleted, false if not found