示例#1
0
文件: group.py 项目: MedPy-C/backend
 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)
示例#2
0
文件: group.py 项目: MedPy-C/backend
 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)
示例#3
0
文件: group.py 项目: MedPy-C/backend
 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)
示例#4
0
文件: group.py 项目: MedPy-C/backend
 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)
示例#5
0
文件: group.py 项目: MedPy-C/backend
 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)
示例#6
0
 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)
示例#7
0
 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)
示例#8
0
 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)
示例#9
0
 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)