put apprise key in source

This commit is contained in:
Pim Kunis 2023-05-26 23:36:06 +02:00
parent c78384f93b
commit fbeaca33aa
2 changed files with 2 additions and 2 deletions

View file

@ -1,12 +1,12 @@
{ {
"params": { "params": {
"key": "concourse",
"body": "hoi", "body": "hoi",
"title": "Titeltje!", "title": "Titeltje!",
"type": "warning", "type": "warning",
"format": "text" "format": "text"
}, },
"source": { "source": {
"key": "concourse",
"host": "https://apprise.pim.kunis.nl:444" "host": "https://apprise.pim.kunis.nl:444"
} }
} }

2
out
View file

@ -14,8 +14,8 @@ payload=$(mktemp /tmp/resource-in.XXXXXX)
cat > "${payload}" <&0 cat > "${payload}" <&0
apprise_host="$(jq -r '.source.host' < "${payload}")" apprise_host="$(jq -r '.source.host' < "${payload}")"
apprise_key="$(jq -r '.source.key' < "${payload}")"
apprise_key="$(jq -r '.params.key' < "${payload}")"
alert_body="$(jq -r '.params.body' < "${payload}")" alert_body="$(jq -r '.params.body' < "${payload}")"
alert_title="$(jq -r '.params.title // null' < "${payload}")" alert_title="$(jq -r '.params.title // null' < "${payload}")"
alert_type="$(jq -r '.params.type // null' < "${payload}")" alert_type="$(jq -r '.params.type // null' < "${payload}")"