demarches-normaliennes/app/components/profile/api_token_card_component.rb
simon lehericey b635c940ae refactor(UI api token): add more information to api token list
- network filtering
- validity
- last used

remove creation logic
2024-01-25 11:17:43 +01:00

11 lines
218 B
Ruby

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