lib/panoptes/endpoints/json_endpoint.rb in panoptes-client-0.2.8 vs lib/panoptes/endpoints/json_endpoint.rb in panoptes-client-0.2.9

- old
+ new

@@ -5,10 +5,10 @@ class JsonEndpoint < BaseEndpoint # Automatically configured connection to use JSON requests/responses # @see Panoptes::Endpoints::BaseEndpoint#initialize def initialize(auth: {}, url: nil, prefix: nil, &config) super auth: auth, url: url, prefix: prefix do |faraday| - config&.call faraday + config.call(faraday) if config faraday.request :json faraday.response :json faraday.adapter Faraday.default_adapter end end