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
501 B
23 lines
501 B
# frozen_string_literal: true |
|
|
|
class BackupsController < ApplicationController |
|
include RoutingHelper |
|
|
|
skip_before_action :check_self_destruct! |
|
skip_before_action :require_functional! |
|
|
|
before_action :authenticate_user! |
|
before_action :set_backup |
|
|
|
BACKUP_LINK_TIMEOUT = 1.hour.freeze |
|
|
|
def download |
|
redirect_to expiring_asset_url(@backup.dump, BACKUP_LINK_TIMEOUT), allow_other_host: true |
|
end |
|
|
|
private |
|
|
|
def set_backup |
|
@backup = current_user.backups.find(params[:id]) |
|
end |
|
end
|
|
|