diff --git a/program/views.py b/program/views.py index bace06fe6246de8b1e4a7952d1e6ef4157b74854..4b139d16d36d654812dc352a0958c584c84e70b0 100644 --- a/program/views.py +++ b/program/views.py @@ -445,7 +445,7 @@ class APIShowViewSet(viewsets.ModelViewSet): /api/v1/shows/?active=false Returns all inactive shows (= past or upcoming) (GET) /api/v1/shows/?host=1 Returns shows assigned to a given host (GET) /api/v1/shows/?owner=1 Returns shows of a given owner (GET) - /api/v1/shows/1 Used for retrieving a single show or update (if owned) (GET, PUT, DELETE) + /api/v1/shows/1 Used for retrieving a single show or update (if owned) (GET, PUT) - DELETE is not allowed via API. Set is_active to False instead. /api/v1/shows/1/notes Returns all notes to the show (GET) - POST not allowed at this level, use /shows/1/schedules/1/timeslots/1/note instead /api/v1/shows/1/notes/1 Returns the note of the show by its ID (GET) - PUT/DELETE not allowed at this level, use /shows/1/schedules/1/timeslots/1/note/1/ instead /api/v1/shows/1/schedules Returns all schedules of the show (GET, POST) @@ -554,6 +554,7 @@ class APIShowViewSet(viewsets.ModelViewSet): Only superusers may delete shows """ + """ if not request.user.is_superuser: return Response(status=status.HTTP_401_UNAUTHORIZED) @@ -561,7 +562,9 @@ class APIShowViewSet(viewsets.ModelViewSet): Show.objects.get(pk=pk).delete() return Response(status=status.HTTP_204_NO_CONTENT) + """ + return Response(status=status.HTTP_401_UNAUTHORIZED) class APIScheduleViewSet(viewsets.ModelViewSet):