Commit eb8cec42 authored by Sebastian Böhm's avatar Sebastian Böhm
Browse files

add device info endpoint

parent 37cd6d95
......@@ -142,3 +142,6 @@ dmypy.json
cython_debug/
# End of https://www.toptal.com/developers/gitignore/api/python
# SQLite db
*.db
\ No newline at end of file
import os
import json
import threading
import logging
......@@ -90,6 +91,10 @@ class WebApp(threading.Thread):
cpu_load_svc.delete_cpu_load_job_by_id(id)
return Response(status=200)
@app.route("/device-info")
def get_device_info():
return json.dumps({"device-info": os.getenv('MQTT_CLIENT_ID')})
return app
def run(self):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment