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