improvements

This commit is contained in:
KF7EEL 2021-04-21 16:10:52 -07:00
parent 0719db4e77
commit 1ce6c26d84
2 changed files with 52 additions and 46 deletions

View File

@ -2280,4 +2280,6 @@ if __name__ == '__main__':
else:
threading.Thread(target=aprs_rx, args=(aprs_callsign, aprs_passcode, aprs_server, aprs_port, aprs_filter, user_ssid,)).start()
#logger.info(UNIT_MAP)
#global authorized_users, other_systems
#from .scripts.dashboard.authorized_apps import authorized_users, other_systems
reactor.run()

View File

@ -721,8 +721,12 @@ def mail_rss():
"""
return Response(rss_header + post_data + "\n</channel>\n</rss>", mimetype='text/xml')
@app.route('/api/<api_mode>', methods=['POST'])
@app.route('/api/<api_mode>', methods=['POST', 'GET'])
def api(api_mode=None):
if request.method == 'GET':
print('get')
return render_template('generic.html', title = dashboard_title, content = Markup(api_content))
else:
api_data = request.json
# Find out type of JSON
#print(api_data)