logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

exports_controller.rb (444B)


  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