mirror of
https://github.com/C9Glax/tranga.git
synced 2025-04-13 03:43:17 +02:00
Fix MangaConnector enablestate endpoint
This commit is contained in:
parent
f691529591
commit
721f932fac
@ -50,7 +50,7 @@ public class MangaConnectorController(PgsqlContext context) : Controller
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enabled or disables a Connector
|
/// Enabled or disables a Connector
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">ID of the connector</param>
|
/// <param name="MangaConnectorName">ID of the connector</param>
|
||||||
/// <param name="enabled">Set true to enable</param>
|
/// <param name="enabled">Set true to enable</param>
|
||||||
/// <response code="200"></response>
|
/// <response code="200"></response>
|
||||||
/// <response code="404">Connector with ID not found.</response>
|
/// <response code="404">Connector with ID not found.</response>
|
||||||
@ -59,11 +59,11 @@ public class MangaConnectorController(PgsqlContext context) : Controller
|
|||||||
[ProducesResponseType(Status200OK)]
|
[ProducesResponseType(Status200OK)]
|
||||||
[ProducesResponseType(Status404NotFound)]
|
[ProducesResponseType(Status404NotFound)]
|
||||||
[ProducesResponseType<string>(Status500InternalServerError, "text/plain")]
|
[ProducesResponseType<string>(Status500InternalServerError, "text/plain")]
|
||||||
public IActionResult SetEnabled(string id, bool enabled)
|
public IActionResult SetEnabled(string MangaConnectorName, bool enabled)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
MangaConnector? connector = context.MangaConnectors.Find(id);
|
MangaConnector? connector = context.MangaConnectors.Find(MangaConnectorName);
|
||||||
if (connector is null)
|
if (connector is null)
|
||||||
return NotFound();
|
return NotFound();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user