Class: Backups::BackupsController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/backups/backups_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



5
6
7
8
9
10
11
# File 'app/controllers/backups/backups_controller.rb', line 5

def show
  files = Backup.where(database: params[:name]).map do
    { date: it.created_at, key: it.file.key, size: it.file.byte_size }
  end

  render json: { name: params[:name], files: }
end