logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

peers_controller.rb (368B)


  1. # frozen_string_literal: true
  2. class Api::V1::Instances::PeersController < Api::BaseController
  3. before_action :require_enabled_api!
  4. respond_to :json
  5. def index
  6. render_cached_json('api:v1:instances:peers:index', expires_in: 1.day) { Account.remote.domains }
  7. end
  8. private
  9. def require_enabled_api!
  10. head 404 unless Setting.peers_api_enabled
  11. end
  12. end