From 6efa10793250d59a562a95ffcf5e5ff4b760c355 Mon Sep 17 00:00:00 2001 From: deflax Date: Mon, 15 Jan 2024 03:38:13 +0200 Subject: [PATCH] expand scheduler api with about section and db dump --- src/scheduler/app.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/scheduler/app.py b/src/scheduler/app.py index 4836a17..203e5e4 100644 --- a/src/scheduler/app.py +++ b/src/scheduler/app.py @@ -251,10 +251,21 @@ scheduler.add_job(func=core_api_sync, trigger="interval", seconds=CORE_SYNC_PERI scheduler.start() # Flask API + @app.route('/', methods=['GET']) -def root_query(): +def root_route(): + about_json = { 'about': 'deflax tv api' } + return jsonify(about_json) + +@app.route('/playhead', methods=['GET']) +def playhead_route(): global playhead return jsonify(playhead) +@app.route('/database', methods=['GET']) +def database_route(): + global database + return jsonify(database) + def create_app(): return app