aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/send_game
diff options
context:
space:
mode:
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 .