aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/send_game
diff options
context:
space:
mode:
authorJP Appel <jeanpierre.appel01@gmail.com>2023-10-25 13:45:59 -0400
committerJP Appel <jeanpierre.appel01@gmail.com>2023-10-25 13:45:59 -0400
commit5a46603deb80cdbff0aef265febe40a83916357e (patch)
tree2db90a8471b55c1cbaf1cb9e14debc59b41cbb59 /send_game
parentd2390a95f6039c2b2a1de557316e13072481ce24 (diff)
changed files to allow local test
Diffstat (limited to 'send_game')
-rwxr-xr-xsend_game10
1 files changed, 8 insertions, 2 deletions
diff --git a/send_game b/send_game
index bb758ab..148d699 100755
--- a/send_game
+++ b/send_game
@@ -1,6 +1,12 @@
#!/bin/bash
-jq . "$1" | curl "https://jpappel.xyz/toggle/query" \
+endpoint="/query"
+URL="https://jpappel.xyz/toggle$endpoint"
+[ "$2" == "localhost" ] &&
+ URL="localhost:9090$endpoint"
+
+jq . "$1" | curl -s "$URL" \
--header "Content-Type: application/json" \
--request POST \
- -d @-
+ -d @- |
+ jq .