can edit api_token to change networks and name

This commit is contained in:
simon lehericey 2024-01-26 17:11:00 +01:00
parent 35e9a6e905
commit 5eaa957c31
6 changed files with 129 additions and 6 deletions

View file

@ -89,6 +89,10 @@ class APIToken < ApplicationRecord
expires_at&.past?
end
def eternal?
expires_at.nil?
end
class << self
def generate(administrateur)
plain_token = generate_unique_secure_token