diff --git a/Tranga-API/Program.cs b/Tranga-API/Program.cs index 5681423..0b5ba2e 100644 --- a/Tranga-API/Program.cs +++ b/Tranga-API/Program.cs @@ -58,7 +58,7 @@ app.MapPost("/Tasks/Create", (string taskType, string? connectorName, string? pu taskManager.AddTask(task, connectorName, publication, TimeSpan.Parse(reoccurrenceTime), language??""); }); -app.MapPost("/Tasks/Delete", (string taskType, string? connectorName, string? publicationId) => +app.MapDelete("/Tasks/Delete", (string taskType, string? connectorName, string? publicationId) => { Publication? publication = taskManager.GetAllPublications().FirstOrDefault(pub => pub.internalId == publicationId); TrangaTask.Task task = Enum.Parse(taskType); @@ -93,7 +93,7 @@ app.MapPost("/Queue/Enqueue", (string taskType, string? connectorName, string? p taskManager.AddTaskToQueue(task); }); -app.MapPost("/Queue/Dequeue", (string taskType, string? connectorName, string? publicationId) => +app.MapDelete("/Queue/Dequeue", (string taskType, string? connectorName, string? publicationId) => { TrangaTask.Task pTask = Enum.Parse(taskType); TrangaTask? task = taskManager.GetAllTasks().FirstOrDefault(tTask =>