Finalizing the back end
parent
f2df83c42e
commit
b3ec27be74
|
@ -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/<int:norad>')
|
||||
@app.route('/stations_from_sat/<str:norad>')
|
||||
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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue