diff --git a/API/Controllers/SearchController.cs b/API/Controllers/SearchController.cs index 659b8e2..edd6155 100644 --- a/API/Controllers/SearchController.cs +++ b/API/Controllers/SearchController.cs @@ -20,10 +20,10 @@ public class SearchController(PgsqlContext context) : Controller /// Name/Title of the Manga /// /// Error during Database Operation - [HttpPost("{name}")] + [HttpPost("Name")] [ProducesResponseType(Status200OK, "application/json")] [ProducesResponseType(Status500InternalServerError, "text/plain")] - public IActionResult SearchMangaGlobal(string name) + public IActionResult SearchMangaGlobal([FromBody]string name) { List<(Manga, List?, List?, List?, List?)> allManga = new(); foreach (MangaConnector contextMangaConnector in context.MangaConnectors.Where(connector => connector.Enabled)) @@ -55,7 +55,7 @@ public class SearchController(PgsqlContext context) : Controller /// MangaConnector with ID not found /// MangaConnector with ID is disabled /// Error during Database Operation - [HttpPost("{id}/{name}")] + [HttpPost("{MangaConnectorName}/{SearchName}")] [ProducesResponseType(Status200OK, "application/json")] [ProducesResponseType(Status404NotFound)] [ProducesResponseType(Status406NotAcceptable)] @@ -96,12 +96,13 @@ public class SearchController(PgsqlContext context) : Controller /// No Manga at URL /// No connector found for URL /// Error during Database Operation + [HttpPost("Url")] [ProducesResponseType(Status200OK, "application/json")] [ProducesResponseType(Status300MultipleChoices)] [ProducesResponseType(Status400BadRequest)] [ProducesResponseType(Status404NotFound)] [ProducesResponseType(Status500InternalServerError, "text/plain")] - public IActionResult GetMangaFromUrl(string url) + public IActionResult GetMangaFromUrl([FromBody]string url) { List connectors = context.MangaConnectors.AsEnumerable().Where(c => c.ValidateUrl(url)).ToList(); if (connectors.Count == 0)