mirror of
https://github.com/C9Glax/tranga.git
synced 2025-09-10 03:48:19 +02:00
Move endpoint to get downloading manga
This commit is contained in:
@@ -43,6 +43,20 @@ public class MangaController(MangaContext context) : Controller
|
|||||||
return Ok(context.Mangas.Select(m => m.Key).ToArray());
|
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>
|
/// <summary>
|
||||||
/// Returns all cached <see cref="Manga"/> with <paramref name="MangaIds"/>
|
/// Returns all cached <see cref="Manga"/> with <paramref name="MangaIds"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@@ -65,21 +65,7 @@ public class QueryController(MangaContext context) : Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns all <see cref="Manga"/> that are being downloaded from at least one <see cref="MangaConnector"/>
|
/// Returns <see cref="Manga"/> with names similar to <see cref="Manga"/> (identified by <paramref name="MangaId"/>)
|
||||||
/// </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"/>
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="MangaId">Key of <see cref="Manga"/></param>
|
/// <param name="MangaId">Key of <see cref="Manga"/></param>
|
||||||
/// <response code="200"></response>
|
/// <response code="200"></response>
|
||||||
|
Reference in New Issue
Block a user