mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-14 22:30:20 +00:00
19 lines
526 B
Ruby
19 lines
526 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Admin::TermsOfService::DistributionsController < Admin::BaseController
|
|
before_action :set_terms_of_service
|
|
|
|
def create
|
|
authorize @terms_of_service, :distribute?
|
|
@terms_of_service.touch(:notification_sent_at)
|
|
Admin::DistributeTermsOfServiceNotificationWorker.perform_async(@terms_of_service.id)
|
|
redirect_to admin_terms_of_service_index_path
|
|
end
|
|
|
|
private
|
|
|
|
def set_terms_of_service
|
|
@terms_of_service = TermsOfService.find(params[:terms_of_service_id])
|
|
end
|
|
end
|