🔒️(back) restrict access to favorite_list endpoint
favorite_list endpoint is accessible to anonymous user. This lead to an error 500. This endpoint should be accessible only to authenticated users.
This commit is contained in:
@@ -591,6 +591,7 @@ class DocumentViewSet(
|
||||
@drf.decorators.action(
|
||||
detail=False,
|
||||
methods=["get"],
|
||||
permission_classes=[permissions.IsAuthenticated],
|
||||
)
|
||||
def favorite_list(self, request, *args, **kwargs):
|
||||
"""Get list of favorite documents for the current user."""
|
||||
|
||||
Reference in New Issue
Block a user