about summary refs log tree commit diff
path: root/app/controllers/api_controller.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-23 09:20:34 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-23 09:20:34 +0100
commit4bdb6a0eaffb39fb953689729c9fcf772c7128d6 (patch)
treefcd98ede617616ad46cab322735dcd9512e4f08c /app/controllers/api_controller.rb
parent9b53c7d353477e21ce5f3c6b56beb853cc1c0ef2 (diff)
Rename "publish" to "toot" in english locale, fix lightbox showing old image
before loading new one, cache notifications API, fix missing follow button
on public profiles
Diffstat (limited to 'app/controllers/api_controller.rb')
-rw-r--r--app/controllers/api_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb
index a008f4c1b..a3a2a3275 100644
--- a/app/controllers/api_controller.rb
+++ b/app/controllers/api_controller.rb
@@ -59,11 +59,11 @@ class ApiController < ApplicationController
   end
 
   def current_resource_owner
-    @user ||= User.find(doorkeeper_token.resource_owner_id) if doorkeeper_token
+    @current_user ||= User.find(doorkeeper_token.resource_owner_id) if doorkeeper_token
   end
 
   def current_user
-    @user ||= super || current_resource_owner
+    super || current_resource_owner
   rescue ActiveRecord::RecordNotFound
     nil
   end