Possible doorkeeper fix
This commit is contained in:
parent
a1a97bb483
commit
cacfb6e7ba
|
@ -63,10 +63,10 @@ class Api::BaseController < ApplicationController
|
|||
end
|
||||
|
||||
def current_resource_owner
|
||||
if doorkeeper_token
|
||||
@current_user ||= Rails.cache.fetch("dk:user:#{doorkeeper_token.resource_owner_id}", expires_in: 25.hours) do
|
||||
ActiveRecord::Base.connected_to(role: :writing) do
|
||||
User.find(doorkeeper_token.resource_owner_id)
|
||||
ActiveRecord::Base.connected_to(role: :writing) do
|
||||
if doorkeeper_token
|
||||
@current_user ||= Rails.cache.fetch("dk:user:#{doorkeeper_token.resource_owner_id}", expires_in: 25.hours) do
|
||||
User.find(doorkeeper_token.resource_owner_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue