This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2016-11-30 06:32:26 -08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-04-10 12:27:03 -07:00
|
|
|
module Admin
|
|
|
|
class AccountsController < BaseController
|
|
|
|
def index
|
2017-04-13 04:04:23 -07:00
|
|
|
@accounts = filtered_accounts.page(params[:page])
|
2017-04-10 12:27:03 -07:00
|
|
|
end
|
|
|
|
|
2017-04-13 04:04:23 -07:00
|
|
|
def show
|
|
|
|
@account = Account.find(params[:id])
|
2017-04-10 12:27:03 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2017-04-13 04:04:23 -07:00
|
|
|
def filtered_accounts
|
|
|
|
AccountFilter.new(filter_params).results
|
2017-04-10 12:27:03 -07:00
|
|
|
end
|
|
|
|
|
2017-04-13 04:04:23 -07:00
|
|
|
def filter_params
|
|
|
|
params.permit(
|
|
|
|
:local,
|
|
|
|
:remote,
|
|
|
|
:by_domain,
|
|
|
|
:silenced,
|
|
|
|
:recent,
|
|
|
|
:suspended
|
|
|
|
)
|
2017-04-10 12:27:03 -07:00
|
|
|
end
|
2016-12-04 09:10:40 -08:00
|
|
|
end
|
2016-11-30 06:32:26 -08:00
|
|
|
end
|