Move endpoint to get downloading manga

This commit is contained in:
2025-09-01 21:26:34 +02:00
parent b4a0ce68c3
commit 29d21f06e5
2 changed files with 15 additions and 15 deletions

View File

@@ -43,6 +43,20 @@ public class MangaController(MangaContext context) : Controller
return Ok(context.Mangas.Select(m => m.Key).ToArray());
}
/// <summary>
/// Returns all <see cref="Manga"/> that are being downloaded from at least one <see cref="MangaConnector"/>
/// </summary>
/// <response code="200"></response>
[HttpGet("Downloading")]
[ProducesResponseType<Manga[]>(Status200OK, "application/json")]
public IActionResult GetMangaDownloading()
{
Manga[] ret = context.MangaIncludeAll()
.Where(m => m.MangaConnectorIds.Any(id => id.UseForDownload))
.ToArray();
return Ok(ret);
}
/// <summary>
/// Returns all cached <see cref="Manga"/> with <paramref name="MangaIds"/>
/// </summary>

View File

@@ -65,21 +65,7 @@ public class QueryController(MangaContext context) : Controller
}
/// <summary>
/// Returns all <see cref="Manga"/> that are being downloaded from at least one <see cref="MangaConnector"/>
/// </summary>
/// <response code="200"></response>
[HttpGet("Manga/Downloading")]
[ProducesResponseType<Manga[]>(Status200OK, "application/json")]
public IActionResult GetMangaDownloading()
{
Manga[] ret = context.MangaIncludeAll()
.Where(m => m.MangaConnectorIds.Any(id => id.UseForDownload))
.ToArray();
return Ok(ret);
}
/// <summary>
/// Returns <see cref="Manga"/> with names similar to <see cref="Manga"/> (identified by <paramref name="MangaId"/>
/// Returns <see cref="Manga"/> with names similar to <see cref="Manga"/> (identified by <paramref name="MangaId"/>)
/// </summary>
/// <param name="MangaId">Key of <see cref="Manga"/></param>
/// <response code="200"></response>