lib/promoter/request.rb in promoter-0.1.5 vs lib/promoter/request.rb in promoter-0.1.6
- old
+ new
@@ -43,11 +43,11 @@
puts "-" * 18 + " END DEBUG " + "-" * 18
end
end
def self.auth_header
- if Promoter.api_key.empty?
- raise Unauthorized.new("You need to set your promoter api key. You can register for a Promoter API key with a Promoter.io Account.")
+ if Promoter.api_key.nil?
+ raise Errors::Unauthorized.new("You need to set your promoter api key. You can register for a Promoter API key with a Promoter.io Account.")
end
{ "Authorization" => "Token #{Promoter.api_key}",
'Content-Type' => 'application/json' }
end
\ No newline at end of file