diff --git a/api/main.py b/api/main.py index 6b29118..5044c3f 100644 --- a/api/main.py +++ b/api/main.py @@ -62,10 +62,11 @@ def api(): api = request.query_string.decode('utf-8') try: reply = message_api_request.send_message(api) + print(reply, flush=True) + return reply except Exception as e: reply = "Exception: " + str(e) - print(reply, flush=True) - return reply + return jsonify(error=reply), 500 @app.route("/map/") def serve_map(file): diff --git a/api/map/event/radar.js b/api/map/event/radar.js index d6576bc..58dfbc3 100644 --- a/api/map/event/radar.js +++ b/api/map/event/radar.js @@ -15,8 +15,10 @@ function event_radar() { if (data["detections_localised"].hasOwnProperty(key)) { const target = data["detections_localised"][key]; const points = target["points"]; - - console.log(points); + + for (const point in points) { + console.log(points[point]); + } } }