def delete(self, request, user_login_code, slug_name): uuid_validator(user_login_code) slug_name_validator(slug_name) self.group_logic.delete(request, user_login_code, slug_name) return Response(status=status.HTTP_204_NO_CONTENT)
def list(self, request, user_login_code): uuid_validator(user_login_code) group_list = self.group_logic.list(request, user_login_code) return Response(group_list, status=status.HTTP_200_OK)
def create(self, request, user_login_code): uuid_validator(user_login_code) body_validator(request.data, GroupSerializer) self.group_logic.create(request, user_login_code, request.data) return Response(status=status.HTTP_201_CREATED)
def retrieve(self, request, user_login_code, slug_name): uuid_validator(user_login_code) slug_name_validator(slug_name) group = self.group_logic.retrieve(request, user_login_code, slug_name) return Response(group, status=status.HTTP_200_OK)
def update(self, request, user_login_code, slug_name): uuid_validator(user_login_code) slug_name_validator(slug_name) body_validator(request.data, GroupSerializer) updated_group = self.group_logic.update(user_login_code, slug_name, request.data) return Response(updated_group, status=status.HTTP_200_OK)
def activate(self, request, invitation_code): uuid_validator(invitation_code) new_member = self.invitation_logic.activate(invitation_code, request) return Response(new_member, status=status.HTTP_200_OK)
def list(self, request, user_login_code, slug_name): uuid_validator(user_login_code) slug_name_validator(slug_name) invitation_list = self.invitation_logic.list(user_login_code, slug_name) return Response(invitation_list, status=status.HTTP_200_OK)
def create(self, request, user_login_code, slug_name): uuid_validator(user_login_code) slug_name_validator(slug_name) created_invitation = self.invitation_logic.create(user_login_code, slug_name) return Response(created_invitation, status=status.HTTP_201_CREATED)
def list(self, request, user_login_code, slug_name): uuid_validator(user_login_code) slug_name_validator(slug_name) members_list = self.membership_logic.get_membership(user_login_code, slug_name) return Response(members_list, status=status.HTTP_200_OK)