Skip to content

Commit

Permalink
parse the hamalert call correctly and pass it on
Browse files Browse the repository at this point in the history
  • Loading branch information
tblanarik committed Sep 9, 2024
1 parent d42b2d1 commit 98221d5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions function_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@ def spotbot(req: func.HttpRequest) -> func.HttpResponse:
except ValueError:
pass
else:
name = req_body.get('name')
fullCallsign = req_body.get('fullCallsign')
source = req_body.get('source')
frequency = req_body.get('frequency')
mode = req_body.get('mode')
summitRef = req_body.get('summitRef')
wwffRef = req_body.get('wwffRef')

content = {"content": "TESTING 123"}

content = {"content": f"{fullCallsign} | {source} | freq: {frequency} | mode: {mode} | loc: {summitRef}{wwffRef}"}

target_url = os.getenv('TARGET_URL')
response = requests.post(target_url, json=content)
Expand Down

0 comments on commit 98221d5

Please sign in to comment.