mirror of
https://github.com/C9Glax/tranga.git
synced 2025-02-23 15:50:13 +01:00
26 lines
736 B
C#
26 lines
736 B
C#
|
using API.Schema;
|
|||
|
using API.Schema.MangaConnectors;
|
|||
|
using Asp.Versioning;
|
|||
|
using Microsoft.AspNetCore.Mvc;
|
|||
|
using static Microsoft.AspNetCore.Http.StatusCodes;
|
|||
|
|
|||
|
namespace API.Controllers;
|
|||
|
|
|||
|
[ApiVersion(2)]
|
|||
|
[ApiController]
|
|||
|
[Produces("application/json")]
|
|||
|
[Route("v{v:apiVersion}")]
|
|||
|
public class MiscController(PgsqlContext context) : Controller
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// Get all available Connectors (Scanlation-Sites)
|
|||
|
/// </summary>
|
|||
|
/// <returns>Array of MangaConnector</returns>
|
|||
|
[HttpGet("GetConnectors")]
|
|||
|
[ProducesResponseType<MangaConnector[]>(Status200OK)]
|
|||
|
public IActionResult GetConnectors()
|
|||
|
{
|
|||
|
MangaConnector[] connectors = context.MangaConnectors.ToArray();
|
|||
|
return Ok(connectors);
|
|||
|
}
|
|||
|
}
|