Groups
Controller
@RestController
@RequestMapping(path = "BASE_EQUINOX_ENDPOINT + USERS_KEY + "/{" + IDENTIFIER_KEY + "}/" + GROUPS_KEY"
)
The GroupsController
class is useful
to manage all the group operations
Author
N7ghtm4r3 - Tecknobit
See also
EquinoxController
Properties
Link copied to clipboard
val CANNOT_EXECUTE_ACTION_ON_OWN_ACCOUNT_MESSAGE: String = "action_executed_on_own_account_error_key"
CANNOT_EXECUTE_ACTION_ON_OWN_ACCOUNT_MESSAGE
message to use when the user tried to execute an action on
its account wrong
Link copied to clipboard
groupsHelper
instance to
manage the groups database operations
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
WRONG_GROUP_ALREADY_EXISTS_ERROR_MESSAGE
message to use when the name of the group is already used
Link copied to clipboard
WRONG_GROUP_DESCRIPTION_ERROR_MESSAGE
message to use when the description of the group is not a
valid description
Link copied to clipboard
WRONG_GROUP_NAME_ERROR_MESSAGE
message to use when the name of the group is not a valid
name
Link copied to clipboard
Functions
Link copied to clipboard
@PatchMapping(path = ""/{" + GROUP_IDENTIFIER_KEY + "}" + ACCEPT_GROUP_INVITATION_ENDPOINT",
headers = []
)
Method to accept a group invitation
Link copied to clipboard
@PutMapping(path = ""/{" + GROUP_IDENTIFIER_KEY + "}" + ADD_MEMBERS_ENDPOINT",
headers = []
)
Method to add members to a group
Link copied to clipboard
@PatchMapping(path = ""/{" + GROUP_IDENTIFIER_KEY + "}" + CHANGE_MEMBER_ROLE_ENDPOINT",
headers = []
)
Method to change the role of a group
member
Link copied to clipboard
@PostMapping(headers = []
)
Method to create a new group
Link copied to clipboard
@DeleteMapping(path = ""/{" + GROUP_IDENTIFIER_KEY + "}" + DECLINE_GROUP_INVITATION_ENDPOINT",
headers = []
)
Method to decline a group invitation
Link copied to clipboard
@DeleteMapping(path = "/{" + GROUP_IDENTIFIER_KEY + "}",
headers = []
)
Method to delete a group
Link copied to clipboard
@PostMapping(path = "/{" + GROUP_IDENTIFIER_KEY + "}",
headers = []
)
Method to create edit an existing group
Link copied to clipboard
@PatchMapping(path = ""/{" + GROUP_IDENTIFIER_KEY + "}" + EDIT_PROJECTS_ENDPOINT",
headers = []
)
Method to edit the projects of a group
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@GetMapping(headers = []
)
Method to get a groups list
Link copied to clipboard
Link copied to clipboard
Method to check whether the member of the
operation is not the author of the group
Link copied to clipboard
private open fun isValidRequest(id: String, token: String, payload: GroupDTO, editingMode: Boolean): String
Method to check the validity of a request
between createGroup and editGroup
Link copied to clipboard
@DeleteMapping(path = ""/{" + GROUP_IDENTIFIER_KEY + "}" + LEAVE_GROUP_ENDPOINT",
headers = []
)
Method to leave from a group
Link copied to clipboard
Link copied to clipboard
@DeleteMapping(path = ""/{" + GROUP_IDENTIFIER_KEY + "}" + REMOVE_MEMBER_ENDPOINT",
headers = []
)
Method to remove a group member
Link copied to clipboard