1
0
mirror of https://github.com/whippyshou/mastodon synced 2024-12-01 08:18:48 +09:00
whippy-edition/app/controllers/admin/site_uploads_controller.rb

22 lines
419 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Admin
class SiteUploadsController < BaseController
before_action :set_site_upload
def destroy
authorize :settings, :destroy?
@site_upload.destroy!
redirect_to edit_admin_settings_path, notice: I18n.t('admin.site_uploads.destroyed_msg')
end
private
def set_site_upload
@site_upload = SiteUpload.find(params[:id])
end
end
end