Class: Healthcare::Infra::TardisController

Inherits:
ApplicationController show all
Defined in:
app/controllers/healthcare/infra/tardis_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/controllers/healthcare/infra/tardis_controller.rb', line 8

def create
  customer_code = params["customerCode"]
  command = params["command"]

  case command
  when "after_restore"
    AfterRestore.execute(customer_code)
  when "before_db_drop"
    BeforeDbDrop.execute(customer_code)
  when "destroy"
    Destroy.execute(customer_code)
  when "post_db_restore"
    PostDbRestore.execute(customer_code)
  end
  render json: true, status: :created
end