mirror of
https://github.com/C9Glax/tranga.git
synced 2025-02-23 07:40:13 +01:00
Move GetConnectors to new MiscController
This commit is contained in:
parent
6940e6c64d
commit
519030861d
26
API/Controllers/MiscController.cs
Normal file
26
API/Controllers/MiscController.cs
Normal file
@ -0,0 +1,26 @@
|
||||
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);
|
||||
}
|
||||
}
|
@ -13,17 +13,6 @@ namespace API.Controllers;
|
||||
[Route("v{v:apiVersion}/[controller]")]
|
||||
public class SearchController(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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initiate a search for a Manga on all Connectors
|
||||
|
Loading…
x
Reference in New Issue
Block a user