Revert relative paths, which don't work on production.

This commit is contained in:
W1CDN 2023-07-12 14:54:43 -05:00
parent 9fb3d28cdc
commit ef539e2aa9

View File

@ -118,13 +118,13 @@ def index():
# Get list of recent packets using API # Get list of recent packets using API
# TODO use relative path # TODO use relative path
response = json.loads(requests.get(url_for("packets", _external=True)).text)['data'] response = json.loads(requests.get("https://digi.w1cdn.net/aprs_api/packets").text)['data']
# Play with function to create station list # Play with function to create station list
#stations = select_all_stations(get_db_connection()) #stations = select_all_stations(get_db_connection())
#print(url_for("static", filename="test.txt", _external=True)) #print(url_for("static", filename="test.txt", _external=True))
# this should work: stations = json.loads(requests.get(url_for("stations", _external=True)).text)['data'] # this should work: stations = json.loads(requests.get(url_for("stations", _external=True)).text)['data']
stations = json.loads(requests.get(url_for("stations", _external=True)).text)['data'] stations = json.loads(requests.get("https://digi.w1cdn.net/aprs_api/stations").text)['data']
# Convert unix time to datetime on the fly because I'm lazy right now # Convert unix time to datetime on the fly because I'm lazy right now
for station in stations: for station in stations:
if station['last_heard_unix'] != None: if station['last_heard_unix'] != None: