✏️ Fix: [#69] NotificationType 초대 변수 상세화(프로젝트 초대)
This commit is contained in:
@@ -13,7 +13,7 @@ class InviteCodeUseType(models.TextChoices):
|
|||||||
HACKATHON = 'h', 'h'
|
HACKATHON = 'h', 'h'
|
||||||
|
|
||||||
class NotificationType(models.TextChoices):
|
class NotificationType(models.TextChoices):
|
||||||
INVITE = '초대', '초대'
|
PROJECT_INVITE = '프로젝트 초대', '프로젝트 초대'
|
||||||
|
|
||||||
class InvitationStatus(models.TextChoices):
|
class InvitationStatus(models.TextChoices):
|
||||||
PENDING = '대기', '대기'
|
PENDING = '대기', '대기'
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class ProjectTeamManageAPIView(APIView):
|
|||||||
new_member = get_object_or_404(User, nickname=nickname)
|
new_member = get_object_or_404(User, nickname=nickname)
|
||||||
if ProjectTeamList.objects.filter(project=project, user=new_member).exists():
|
if ProjectTeamList.objects.filter(project=project, user=new_member).exists():
|
||||||
return Response({"message": "already team member"}, status=status.HTTP_400_BAD_REQUEST)
|
return Response({"message": "already team member"}, status=status.HTTP_400_BAD_REQUEST)
|
||||||
new_notification = NotifiationService.create_notification(user=new_member, note_type=NotificationType.INVITE)
|
new_notification = NotifiationService.create_notification(user=new_member, note_type=NotificationType.PROJECT_INVITE)
|
||||||
ProjectInvitationService.create_project_invitation(
|
ProjectInvitationService.create_project_invitation(
|
||||||
project=project,
|
project=project,
|
||||||
from_user=user,
|
from_user=user,
|
||||||
|
|||||||
Reference in New Issue
Block a user