can edit api_token to change networks and name
This commit is contained in:
parent
35e9a6e905
commit
5eaa957c31
6 changed files with 129 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue