Class: FuryDumper::DumpProcessController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/fury_dumper/dump_process_controller.rb

Instance Method Summary collapse

Instance Method Details

#dumpObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/controllers/fury_dumper/dump_process_controller.rb', line 5

def dump
  data = JSON.parse(request.body.read)
  FuryDumper.dump(password: Encrypter.decrypt(data['password']),
                  host: data['host'],
                  port: data['port'],
                  user: data['user'],
                  database: data['database'],
                  model_name: data['model_name'],
                  field_values: data['field_values'],
                  field_name: data['field_name'],
                  debug_mode: :none,
                  ask: false)

  render json: { message: :ok }
end

#healthObject



21
22
23
# File 'app/controllers/fury_dumper/dump_process_controller.rb', line 21

def health
  render json: { message: :ok }
end