mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-23 16:52:53 +01:00
2423d2f677
* Allow deleting site uploads * Refactor and move links into hints * Fix i18n tests * Fix HTML output of site_upload_delete_hint
21 lines
419 B
Ruby
21 lines
419 B
Ruby
# 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
|