From 737eebf599ce903ae010cd826b074492da32e835 Mon Sep 17 00:00:00 2001 From: glax Date: Sun, 21 May 2023 22:01:56 +0200 Subject: [PATCH] bring /settings/update in line with new methods --- Tranga-API/Program.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Tranga-API/Program.cs b/Tranga-API/Program.cs index deffeb7..5681423 100644 --- a/Tranga-API/Program.cs +++ b/Tranga-API/Program.cs @@ -105,13 +105,7 @@ app.MapPost("/Queue/Dequeue", (string taskType, string? connectorName, string? p app.MapGet("/Settings/Get", () => new Settings(taskManager.settings)); -app.MapPost("/Settings/Update", (string? downloadLocation, string? komgaUrl, string? komgaAuth) => -{ - if(downloadLocation is not null) - taskManager.settings.downloadLocation = downloadLocation; - if(komgaUrl is not null && komgaAuth is not null) - taskManager.settings.komga = new Komga(komgaUrl, komgaAuth, logger); -}); +app.MapPost("/Settings/Update", (string? downloadLocation, string? komgaUrl, string? komgaAuth) => taskManager.UpdateSettings(downloadLocation, komgaUrl, komgaAuth) ); app.Run();