(request: WSGIRequest)
return HttpResponse("Updated credentials")
Update soundcloud credentials.
Update soundcloud credentials.
Update soundcloud credentials .
def set_soundcloud_credentials(request: WSGIRequest) -> HttpResponse:
    """Update soundcloud credentials."""
    auth_token = request.POST.get("auth_token")

    if not auth_token:
        return HttpResponseBadRequest("All fields are required")

    storage.set("soundcloud_auth_token", auth_token)

    system.update_mopidy_config("pulse")
    return HttpResponse("Updated credentials")
def set_soundcloud_credentials ( request : WSGIRequest ) -> HttpResponse : auth_token = request . POST . get ( "auth_token" ) if not auth_token : return HttpResponseBadRequest ( "All fields are required" ) storage . set ( "soundcloud_auth_token" , auth_token ) system . update_mopidy_config ( "pulse" ) return HttpResponse ( "Updated credentials" )