wip
This commit is contained in:
parent
5f43f86adb
commit
1d42fd88d1
1 changed files with 7 additions and 3 deletions
|
@ -3,12 +3,16 @@ require "kemal"
|
|||
strategies_dir = ENV.fetch("STRATEGIES_DIR")
|
||||
|
||||
post "/:strategy" do |env|
|
||||
output = IO::Memory.new
|
||||
output = IO::Memory.new
|
||||
params = env.params.query.to_h.to_json
|
||||
puts params
|
||||
hook = env.params.json.to_json
|
||||
puts hook
|
||||
Process.run(
|
||||
"#{strategies_dir}/#{env.params.url["strategy"]}",
|
||||
[
|
||||
env.params.query.to_h.to_json,
|
||||
env.params.json.to_json
|
||||
params,
|
||||
hook,
|
||||
],
|
||||
output: output,
|
||||
error: output,
|
||||
|
|
Loading…
Reference in a new issue