Fix posting points
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Kevin Alberts 2025-07-15 14:29:55 +02:00
parent 46860be847
commit e20e3bf40a

View file

@ -49,10 +49,10 @@ def ingest_request():
response1 = requests.post(
f"{REITTI_BASE_URL}/api/v1/ingest/owntracks",
json=data,
headers=request.headers,
headers={'Content-Type': 'application/json'},
params={'token': REITTI_API_KEY}
)
app.logger.info(f'Forwarded point to Reitti: {response1.status_code}')
app.logger.info(f'Forwarded point to Reitti: {response1.status_code} - Body: {response1.content}')
except Exception as e:
app.logger.error(f'Error forwarding request to Reitti: {str(e)}')
@ -65,10 +65,10 @@ def ingest_request():
response2 = requests.post(
f"{DAWARICH_BASE_URL}/api/v1/owntracks/points",
json=data,
headers=request.headers,
headers={'Content-Type': 'application/json'},
params={'api_key': DAWARICH_API_KEY}
)
app.logger.info(f'Forwarded point to Dawarich: {response2.status_code}')
app.logger.info(f'Forwarded point to Dawarich: {response2.status_code} - Body: {response2.content}')
except Exception as e:
app.logger.error(f'Error forwarding request to Dawarich: {str(e)}')