You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
444 B

  1. # frozen_string_literal: true
  2. class Settings::ExportsController < ApplicationController
  3. include Authorization
  4. layout 'admin'
  5. before_action :authenticate_user!
  6. def show
  7. @export = Export.new(current_account)
  8. @backups = current_user.backups
  9. end
  10. def create
  11. authorize :backup, :create?
  12. backup = current_user.backups.create!
  13. BackupWorker.perform_async(backup.id)
  14. redirect_to settings_export_path
  15. end
  16. end