From 3e4231938ea37360bb0afec5cfb4c6e2b9c96355 Mon Sep 17 00:00:00 2001 From: n07070 Date: Thu, 12 Nov 2026 15:35:01 +0100 Subject: [PATCH] Add API route for printer information --- src/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.py b/src/main.py index b9f4cdb..33d89e4 100644 --- a/src/main.py +++ b/src/main.py @@ -358,6 +358,10 @@ def api_worker_stop(): worker.stop_worker() return jsonify(worker.current_state()) +@app.route("/api/printers") +def api_printers_info(): + """Returns the current state of every printers""" + return jsonify(printers_pool.printers_info()) ## Authentification