Skip to content

Commit

Permalink
Make GET active shift API call protected
Browse files Browse the repository at this point in the history
  • Loading branch information
vincevd1 committed Oct 23, 2024
1 parent adee2f9 commit 8d6e49d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions website/orders/api/v1/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ class OrderVenueActiveShiftAPIView(APIView):
"""API View to retrieve the active shift."""

serializer_class = ShiftSerializer
permission_classes = [IsAuthenticatedOrTokenHasScopeForMethod]
required_scopes_for_method = {
"GET": ["orders:order"]
}

def get(self, request, **kwargs):
"""Get the active shift of an order venue if there is one, otherwise return 404."""
Expand Down

0 comments on commit 8d6e49d

Please sign in to comment.