Skip to content

Commit

Permalink
Fix c
Browse files Browse the repository at this point in the history
  • Loading branch information
gridanjbf committed Apr 16, 2024
1 parent 65a4894 commit eb4ea88
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/sharepoint/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ class Token
attr_accessor :expires_in
attr_accessor :access_token
attr_accessor :fetched_at
attr_accessor :config
attr_reader :config

def initialize(c)
self.config = c
puts config
def initialize(config)
@config = config
end

def ensure
Expand All @@ -46,7 +45,7 @@ def fetch
}

easy = Ethon::Easy.new
easy.http_request(config.auth.token_url, :post, { body: auth_request })
easy.http_request(config.token_url, :post, { body: auth_request })
http_resp = easy.perform
raise InvalidTokenError.new(http_resp.body.to_s) unless http_resp.code == 200

Expand Down

0 comments on commit eb4ea88

Please sign in to comment.