lib/hull/request/auth.rb in hullio-0.2.1 vs lib/hull/request/auth.rb in hullio-0.3.0
- old
+ new
@@ -4,10 +4,11 @@
module Request
class Auth < Faraday::Middleware
def call(env)
env[:request_headers]["Hull-Access-Token"] = @credentials[:app_secret]
- env[:request_headers]["Hull-App-id"] = @credentials[:app_id]
+ env[:request_headers]["Hull-App-Id"] = @credentials[:app_id]
+ env[:request_headers]["Hull-User-Id"] = @credentials[:user_id] if @credentials[:user_id]
@app.call(env)
end
def initialize(app, credentials)
@app, @credentials = app, credentials
\ No newline at end of file