akkounts/app/controllers/services/mastodon_controller.rb

15 lines
343 B
Ruby

class Services::MastodonController < Services::BaseController
before_action :authenticate_user!
before_action :require_service_available
def show
@service_enabled = current_user.service_enabled?(:mastodon)
end
private
def require_service_available
http_status :not_found unless Setting.mastodon_enabled?
end
end