demarches-normaliennes/app/lib/api_entreprise/privileges_adapter.rb

21 lines
287 B
Ruby
Raw Normal View History

2020-08-05 18:40:47 +02:00
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
2020-08-05 18:40:47 +02:00
APIEntreprise::API.privileges(@token)
end
end