mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-12 21:52:21 +01:00
fix(queues): now really fix the request notifications
Instead of checking for success, now the correct HTTP response code is sent by the request API. My previous fix broke the other responses, oops. Closes #82 Relates #44 The refresh as introduced in my fix for #82 (!89) is reverted, as this was already done on successful requests.
This commit is contained in:
@ -163,7 +163,7 @@ class QueueRequestAPIView(CreateAPIView):
|
||||
try:
|
||||
playlist_song = queue.request(song, request.user)
|
||||
except RequestException as e:
|
||||
return Response(data={"success": False, "errorMessage": str(e)})
|
||||
return Response(status=403, data={"success": False, "errorMessage": str(e)})
|
||||
|
||||
request_counter.labels(queue=queue.name).inc()
|
||||
return Response(status=200, data=self.serializer_class(playlist_song).data)
|
||||
|
||||
Reference in New Issue
Block a user