(request: WSGIRequest)
return HttpResponse()
Empties the queue. Only admin is permitted to do this.
Empties the queue. Only admin is permitted to do this.
Empties the queue . Only admin is permitted to do this .
def remove_all(request: WSGIRequest) -> HttpResponse:
    """Empties the queue. Only admin is permitted to do this."""
    if not user_manager.is_admin(request.user):
        return HttpResponseForbidden()
    with playback.mopidy_command() as allowed:
        if allowed:
            with transaction.atomic():
                playback.queue.all().delete()
    return HttpResponse()
def remove_all ( request : WSGIRequest ) -> HttpResponse : if not user_manager . is_admin ( request . user ) : return HttpResponseForbidden ( ) with playback . mopidy_command ( ) as allowed : if allowed : with transaction . atomic ( ) : playback . queue . all ( ) . delete ( ) return HttpResponse ( )