The code powering m.abunchtell.com https://m.abunchtell.com
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 

29 líneas
754 B

  1. # frozen_string_literal: true
  2. class FollowerAccountsController < ApplicationController
  3. include AccountControllerConcern
  4. def index
  5. @follows = Follow.where(target_account: @account).recent.page(params[:page]).per(FOLLOW_PER_PAGE).preload(:account)
  6. respond_to do |format|
  7. format.html
  8. format.json do
  9. render json: collection_presenter, serializer: ActivityPub::CollectionSerializer, adapter: ActivityPub::Adapter
  10. end
  11. end
  12. end
  13. private
  14. def collection_presenter
  15. ActivityPub::CollectionPresenter.new(
  16. id: account_followers_url(@account),
  17. type: :ordered,
  18. size: @account.followers_count,
  19. items: @follows.map { |f| ActivityPub::TagManager.instance.uri_for(f.account) }
  20. )
  21. end
  22. end