Skip to content

Commit

Permalink
fix: views
Browse files Browse the repository at this point in the history
  • Loading branch information
Shavkatjon-O committed Sep 15, 2024
1 parent 4e8d8b3 commit ff9dcfe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/meetings/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ class MeetingCreateView(generics.CreateAPIView):
queryset = Meeting.objects.all()
serializer_class = MeetingSerializer

def perform_create(self, serializer):
serializer.save(user=self.request.user)


class MeetingListView(generics.ListAPIView):
queryset = Meeting.objects.all()
serializer_class = MeetingSerializer

def get_queryset(self):
return Meeting.objects.filter(user=self.request.user)

0 comments on commit ff9dcfe

Please sign in to comment.