diff options
author | David Yip <yipdw@member.fsf.org> | 2018-02-23 15:05:00 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-23 15:05:00 -0600 |
commit | f53953d28a24fe65f1ca66d85a1416ba30dcda86 (patch) | |
tree | 4e9e2214629b46ddc98fdce358abc812112f13fa /app/controllers/settings | |
parent | 544543e40a723d9719f5571bd4c3455a6a69fccd (diff) | |
parent | f2f19e1f8a3a048cf0a0041ae54d912acfea7742 (diff) |
Merge pull request #369 from KnzkDev/merge-upstream
Merge with upstream @ e668180044560e28bdc5eef94744c210013efcda
Diffstat (limited to 'app/controllers/settings')
-rw-r--r-- | app/controllers/settings/exports_controller.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/app/controllers/settings/exports_controller.rb b/app/controllers/settings/exports_controller.rb index 9c03ece86..cf8745576 100644 --- a/app/controllers/settings/exports_controller.rb +++ b/app/controllers/settings/exports_controller.rb @@ -1,7 +1,19 @@ # frozen_string_literal: true class Settings::ExportsController < Settings::BaseController + include Authorization + def show - @export = Export.new(current_account) + @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 end end |