api keys: allow users to have multiple API keys.
This is useful if you have multiple programs and want to give them different API keys, or if you want to rotate keys for a single program.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
class ApiKey < ApplicationRecord
|
||||
belongs_to :user
|
||||
validates_uniqueness_of :user_id
|
||||
validates_uniqueness_of :key
|
||||
has_secure_token :key
|
||||
|
||||
|
||||
Reference in New Issue
Block a user