Skip to content

Commit

Permalink
i forget how to python
Browse files Browse the repository at this point in the history
  • Loading branch information
tblanarik committed Sep 9, 2024
1 parent a2cf69f commit 3fdb185
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions function_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,14 @@
def spotbot(req: func.HttpRequest) -> func.HttpResponse:
logging.info('Python HTTP trigger function processed a request.')

try:
req_body = req.get_json()
except ValueError:
pass
else:
fullCallsign = req_body.get('fullCallsign', 'Unknown')
source = req_body.get('source', 'Unknown')
frequency = req_body.get('frequency', 'Unknown')
mode = req_body.get('mode', 'Unknown')
summitRef = req_body.get('summitRef', '')
wwffRef = req_body.get('wwffRef', '')
req_body = req.get_json()
fullCallsign = req_body.get('fullCallsign', 'Unknown')
source = req_body.get('source', 'Unknown')
frequency = req_body.get('frequency', 'Unknown')
mode = req_body.get('mode', 'Unknown')
summitRef = req_body.get('summitRef', '')
wwffRef = req_body.get('wwffRef', '')


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

target_url = os.getenv('TARGET_URL')
Expand Down

0 comments on commit 3fdb185

Please sign in to comment.