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.

17 lines
368 B

  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