demarches-normaliennes/app/components/profile/api_token_card_component.rb

14 lines
249 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class Profile::APITokenCardComponent < ApplicationComponent
private
def render?
current_administrateur.present?
end
def api_tokens
current_administrateur.api_tokens.order(created_at: :desc)
end
end