about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-02-04 20:57:40 -0600
committermultiple creatures <dev@multiple-creature.party>2020-02-04 20:57:40 -0600
commit3631689bdb59b681d13f0443d8b60ae0d18445d8 (patch)
treef7f0cc0652956fabd43c8a0f279f68dddde8817d /app/controllers
parent739b715c29fadb2f7d1b63961d6bd7577537d740 (diff)
use `raise_not_found` instead of `not_found` to avoid attempting to call multiple renderers
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/accounts_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb
index 7af95b51c..07d364714 100644
--- a/app/controllers/accounts_controller.rb
+++ b/app/controllers/accounts_controller.rb
@@ -14,9 +14,9 @@ class AccountsController < ApplicationController
       format.html do
         use_pack 'public'
         unless current_account && current_account.id == @account.id
-          not_found if @account.hidden
+          raise_not_found if @account.hidden
           if @account&.user && @account.user.hides_public_profile?
-            not_found unless current_account && current_account.following?(@account)
+            raise_not_found unless current_account&.following?(@account)
           end
         end
         expires_in 0, public: true unless user_signed_in?
@@ -43,7 +43,7 @@ class AccountsController < ApplicationController
       format.rss do
         expires_in 1.minute, public: true
 
-        not_found unless current_account&.user&.allows_rss?
+        raise_not_found unless current_account&.user&.allows_rss?
 
         @statuses = filtered_statuses.without_reblogs.without_replies.limit(PAGE_SIZE)
         @statuses = cache_collection(@statuses, Status)