]> cat aescling's git repositories - mastodon.git/commitdiff
Change following and followers API to be accessible without being logged in (#18964)
authorEugen Rochko <eugen@zeonfederated.com>
Sun, 28 Aug 2022 01:45:07 +0000 (03:45 +0200)
committeraescling <aescling+gitlab@cat.family>
Thu, 17 Nov 2022 02:55:27 +0000 (21:55 -0500)
app/controllers/api/v1/accounts/follower_accounts_controller.rb
app/controllers/api/v1/accounts/following_accounts_controller.rb

index a665863ebf4816993aca4fdac80701ca3dd8babc..b61de13b913be0c89dc0652a864ba71dcc0f1e39 100644 (file)
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 class Api::V1::Accounts::FollowerAccountsController < Api::BaseController
-  before_action -> { doorkeeper_authorize! :read, :'read:accounts' }
+  before_action -> { authorize_if_got_token! :read, :'read:accounts' }
   before_action :set_account
   after_action :insert_pagination_headers
 
index 7d885a212f2c349ad1490f0053f8654ae9bd32da..37d3c2d7834b76562863ad5b5d5da14903e2e8c4 100644 (file)
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 class Api::V1::Accounts::FollowingAccountsController < Api::BaseController
-  before_action -> { doorkeeper_authorize! :read, :'read:accounts' }
+  before_action -> { authorize_if_got_token! :read, :'read:accounts' }
   before_action :set_account
   after_action :insert_pagination_headers