From 8829132046b6f56feeda89f0d448be258fd15a25 Mon Sep 17 00:00:00 2001 From: glax Date: Sun, 21 May 2023 02:13:19 +0200 Subject: [PATCH] Cleanup code --- Tranga-API/Program.cs | 1 - Tranga/TaskManager.cs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Tranga-API/Program.cs b/Tranga-API/Program.cs index c43a50e..7f9138e 100644 --- a/Tranga-API/Program.cs +++ b/Tranga-API/Program.cs @@ -65,7 +65,6 @@ app.MapGet("/RemoveTask", (TrangaTask.Task task, string? connectorName, string? case TrangaTask.Task.UpdateKomgaLibrary: taskManager.RemoveTask(TrangaTask.Task.UpdateKomgaLibrary, null, null); return JsonSerializer.Serialize("Success"); - break; case TrangaTask.Task.DownloadNewChapters: Publication? publication = taskManager.GetAllPublications().FirstOrDefault(pub => pub.downloadUrl == publicationName); if (publication is null) diff --git a/Tranga/TaskManager.cs b/Tranga/TaskManager.cs index c73e55b..a893e4c 100644 --- a/Tranga/TaskManager.cs +++ b/Tranga/TaskManager.cs @@ -212,7 +212,7 @@ public class TaskManager /// /// Connector-name (exact) /// If Connector is not available - public Connector GetConnector(string connectorName) + public Connector GetConnector(string? connectorName) { if(connectorName is null) throw new Exception($"connectorName can not be null");