notify: now uses all args + changed password

This commit is contained in:
eyjhb 2025-03-10 20:37:51 +01:00
parent bf64ab19e1
commit 20a1cc7955
Signed by: eyjhb
GPG key ID: 609F508E3239F920
3 changed files with 29 additions and 23 deletions

View file

@ -73,8 +73,15 @@ data = args.body
if data == "-" and not sys.stdin.isatty():
data = "\n".join(sys.stdin.readlines())
req = requests.post(args.url, headers={{"Authorization": f"Bearer {{token}}"}}, data=data)
print(req.text)
headers = {{"Authorization": f"Bearer {{token}}"}}
params = {{
"title": args.title,
"jq": args.jq,
"type": args.type,
}}
req = requests.post(args.url, headers=headers, params=params, data=data)
exit(not req.status_code == 200)
"""
script_example_with_token = script_example.replace(