diff --git a/satnogs.py b/satnogs.py index ce672c6..71cd656 100644 --- a/satnogs.py +++ b/satnogs.py @@ -135,14 +135,14 @@ def updateTLE(): def map_view(): return render_template("map.html") -@app.route('/api/active_stations') +@app.route('/active_stations') def api_active_stations(): sations = [] for x in Stations: sations.append([x["name"],x["lat"],x["lng"]]) - return json.dumps(Stations) + return json.dumps(sations) -@app.route('/api/stations_from_sat/') +@app.route('/stations_from_sat/') def api_occuring_observations(norad): obs = [] for x in Passes: @@ -151,7 +151,7 @@ def api_occuring_observations(norad): return json.dumps(obs) -@app.route('/api/occuring_sats') +@app.route('/occuring_sats') def api_occuring_sats(): tle = {} for x in Passes: diff --git a/templates/map.html b/templates/map.html index 46347c5..e8487c0 100644 --- a/templates/map.html +++ b/templates/map.html @@ -78,7 +78,7 @@ function UpdateMap(e) { var links = e[1] } - $.get("/api/activestations", function(data, status){ + $.get("/activestations", function(data, status){ data = JSON.parse(data) Object.keys(data).forEach(function(key){ sat = light_sat