feat(api): add last_authenticated_at timestamp to api requests
This commit is contained in:
parent
a8f7ce77c3
commit
e9cb50d09c
7 changed files with 31 additions and 4 deletions
|
@ -39,7 +39,9 @@ class API::V2::BaseController < ApplicationController
|
|||
|
||||
def api_token
|
||||
if @api_token.nil?
|
||||
@api_token = APIToken.find_and_verify(authorization_bearer_token) || false
|
||||
@api_token = APIToken
|
||||
.find_and_verify(authorization_bearer_token)
|
||||
&.tap { _1.touch(:last_v2_authenticated_at) } || false
|
||||
end
|
||||
@api_token
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue