From e9db7cfacc170b1b8e83fd01b4e1783095a9c20d Mon Sep 17 00:00:00 2001 From: glax Date: Sun, 21 May 2023 16:41:02 +0200 Subject: [PATCH] API: List Settings --- Tranga-API/Program.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Tranga-API/Program.cs b/Tranga-API/Program.cs index f701d7c..f69ddcf 100644 --- a/Tranga-API/Program.cs +++ b/Tranga-API/Program.cs @@ -135,7 +135,8 @@ app.MapGet("/TaskEnqueue", (TrangaTask.Task task, string? connectorName, string? }); app.MapGet("/TaskDequeue", (TrangaTask.Task task, string? connectorName, string? publicationInternalId) => -{TrangaTask[] allTasks = taskManager.GetAllTasks(); +{ + TrangaTask[] allTasks = taskManager.GetAllTasks(); TrangaTask? taskToDequeue = allTasks.FirstOrDefault(tTask => tTask.task == task && tTask.connectorName == connectorName && tTask.publication?.internalId == publicationInternalId); @@ -145,4 +146,6 @@ app.MapGet("/TaskDequeue", (TrangaTask.Task task, string? connectorName, string? return JsonSerializer.Serialize("Success"); }); +app.MapGet("/Settings", () => JsonSerializer.Serialize(taskManager.settings)); + app.Run(); \ No newline at end of file