This commit is contained in:
2022-06-04 20:21:45 -04:00
parent 800d858350
commit dd6771f3e0
2 changed files with 1 additions and 9 deletions
+1 -1
View File
@@ -141,7 +141,7 @@ function retrieveSchedule(airport, state) {
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://"+window.location.hostname+":5000/url", true);
xhr.open("POST", "http://"+window.location.hostname+":5000/curl", true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
-8
View File
@@ -50,14 +50,6 @@ def volume():
level = os.popen('vol').read()
return str(level)
@app.route('/cmd',methods = ['POST'])
def command():
if request.method == 'POST':
json = request.get_json()
output = os.popen("cd /usr/share/dump1090-mutability/html && "+json['command']).read()
#output = os.popen(json['command']).read()
return str(output)
@app.route('/curl',methods = ['POST'])
def curl():
if request.method == 'POST':