about summary refs log tree commit diff
path: root/app/controllers/concerns/remote_account_controller_concern.rb
blob: e1791064244303d121eba26f3883a7d199500c8b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

module RemoteAccountControllerConcern
  extend ActiveSupport::Concern

  included do
    layout 'public'
    before_action :set_account
    before_action :check_account_suspension
  end

  private

  def set_account
    @account = Account.find_remote!(params[:acct])
  end

  def check_account_suspension
    gone if @account.suspended?
  end
end