demarches-normaliennes/app/lib/api_entreprise/privileges_adapter.rb
Pierre de La Morinerie 150ddab660 zeitwerk: Api -> API
2021-02-09 13:07:30 +01:00

20 lines
287 B
Ruby

class APIEntreprise::PrivilegesAdapter < APIEntreprise::Adapter
def initialize(token)
@token = token
end
def valid?
begin
get_resource
true
rescue
false
end
end
private
def get_resource
APIEntreprise::API.privileges(@token)
end
end