mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-20 00:35:22 +00:00
scramble key names once revoked (#762)
This commit is contained in:
parent
f406bec762
commit
5f45d9f7af
1 changed files with 4 additions and 1 deletions
|
|
@ -13,7 +13,10 @@ class AdminApiKey < ApplicationRecord
|
|||
end
|
||||
|
||||
def revoke!
|
||||
update!(revoked_at: Time.current)
|
||||
update!(
|
||||
revoked_at: Time.current,
|
||||
name: "#{name}_revoked_#{SecureRandom.hex(8)}"
|
||||
)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue