1
0
mirror of https://github.com/mastodon/mastodon synced 2024-12-15 07:08:29 +09:00
mastodon/app/controllers/settings/exports_controller.rb

31 lines
547 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class Settings::ExportsController < ApplicationController
include Authorization
layout 'admin'
before_action :authenticate_user!
before_action :set_body_classes
2017-03-20 04:29:41 +09:00
def show
@export = Export.new(current_account)
@backups = current_user.backups
end
def create
authorize :backup, :create?
backup = current_user.backups.create!
BackupWorker.perform_async(backup.id)
redirect_to settings_export_path
2017-03-20 04:29:41 +09:00
end
private
def set_body_classes
@body_classes = 'admin'
end
end