From 94a8dfc90a2ee92a69037628fd1231fa650312ec Mon Sep 17 00:00:00 2001 From: glax Date: Mon, 1 Sep 2025 21:20:45 +0200 Subject: [PATCH] Add endpoint to return worker keys --- API/Controllers/WorkerController.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/API/Controllers/WorkerController.cs b/API/Controllers/WorkerController.cs index 4ac4659..9c8f807 100644 --- a/API/Controllers/WorkerController.cs +++ b/API/Controllers/WorkerController.cs @@ -22,6 +22,17 @@ public class WorkerController() : Controller { return Ok(Tranga.GetRunningWorkers().ToArray()); } + + /// + /// Returns all .Keys + /// + /// + [HttpGet("Keys")] + [ProducesResponseType(Status200OK, "application/json")] + public IActionResult GetWorkerIds() + { + return Ok(Tranga.GetRunningWorkers().Select(w => w.Key).ToArray()); + } /// /// Get all in requested