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

14 lines
249 B
Ruby
Raw Permalink 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