You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
575 B

  1. # frozen_string_literal: true
  2. module Admin
  3. class AccountsController < BaseController
  4. def index
  5. @accounts = filtered_accounts.page(params[:page])
  6. end
  7. def show
  8. @account = Account.find(params[:id])
  9. end
  10. private
  11. def filtered_accounts
  12. AccountFilter.new(filter_params).results
  13. end
  14. def filter_params
  15. params.permit(
  16. :local,
  17. :remote,
  18. :by_domain,
  19. :silenced,
  20. :recent,
  21. :suspended,
  22. :username,
  23. :display_name,
  24. :email,
  25. :ip
  26. )
  27. end
  28. end
  29. end