From 45c80833e68ab188c634dc23d93c64d322921bf5 Mon Sep 17 00:00:00 2001 From: kovacspe Date: Sun, 12 Nov 2023 12:43:46 +0100 Subject: [PATCH] Change POST to GET on event/active --- competition/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/competition/views.py b/competition/views.py index 67faa286..c45d0d9f 100644 --- a/competition/views.py +++ b/competition/views.py @@ -783,8 +783,8 @@ def participants(self, request, pk=None): # Profile serializer return event.registered_profiles() - @action(methods=['post'], detail=False, permission_classes=[IsAuthenticated]) - def active(self): + @action(methods=['get'], detail=False, permission_classes=[IsAuthenticated]) + def active(self, request): """Get all active events""" active_events = self.get_queryset().active() serializer = self.serializer_class(active_events, many=True)