lib/learn_web/client/user.rb in learn-web-1.0.5 vs lib/learn_web/client/user.rb in learn-web-1.1.0
- old
+ new
@@ -6,13 +6,13 @@
def me_endpoint
"#{API_ROOT}/users/me"
end
def me
- response = @conn.get do |req|
- req.url me_endpoint
- req.headers['Authorization'] = "Bearer #{token}"
- end
+ response = get(
+ me_endpoint,
+ headers: { 'Authorization' => "Bearer #{token}" }
+ )
LearnWeb::Client::User::Me.new(response, silent_output: silent_output)
end
end
end