akkounts/app/controllers/services/mastodon_controller.rb
Râu Cao ecdeb4c122
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Release Drafter / Update release notes draft (pull_request) Successful in 3s
Fix copypasta
2023-09-01 10:32:11 +02:00

15 lines
352 B
Ruby

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