Only allow get method in user list endpoint

This commit is contained in:
keannu125 2023-03-07 20:39:33 +08:00
parent d2a869b685
commit dd115197f4

View file

@ -13,6 +13,7 @@ class ProductViewSet(viewsets.ModelViewSet):
class UserListViewSet(viewsets.ModelViewSet):
# permission_classes = [IsAuthenticated]
http_method_names = ['get']
serializer_class = UserSerializer
queryset = User.objects.all()