|
|
@ -5,6 +5,7 @@ class Api::V1::AccountsController < Api::BaseController
|
|
|
|
before_action -> { doorkeeper_authorize! :follow }, only: [:follow, :unfollow, :block, :unblock, :mute, :unmute]
|
|
|
|
before_action -> { doorkeeper_authorize! :follow }, only: [:follow, :unfollow, :block, :unblock, :mute, :unmute]
|
|
|
|
before_action :require_user!, except: [:show]
|
|
|
|
before_action :require_user!, except: [:show]
|
|
|
|
before_action :set_account
|
|
|
|
before_action :set_account
|
|
|
|
|
|
|
|
before_action :check_account_suspension, only: [:show]
|
|
|
|
|
|
|
|
|
|
|
|
respond_to :json
|
|
|
|
respond_to :json
|
|
|
|
|
|
|
|
|
|
|
@ -54,4 +55,8 @@ class Api::V1::AccountsController < Api::BaseController
|
|
|
|
def relationships(**options)
|
|
|
|
def relationships(**options)
|
|
|
|
AccountRelationshipsPresenter.new([@account.id], current_user.account_id, options)
|
|
|
|
AccountRelationshipsPresenter.new([@account.id], current_user.account_id, options)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_account_suspension
|
|
|
|
|
|
|
|
gone if @account.suspended?
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|