mirror of
https://github.com/C9Glax/tranga.git
synced 2025-04-14 04:13:18 +02:00
Return TrangaSettings as proper Json instead of string
This commit is contained in:
parent
93ad691971
commit
f2961711cf
@ -1,8 +1,8 @@
|
|||||||
using System.Text.Json.Nodes;
|
using API.MangaDownloadClients;
|
||||||
using API.MangaDownloadClients;
|
|
||||||
using API.Schema;
|
using API.Schema;
|
||||||
using Asp.Versioning;
|
using Asp.Versioning;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
using static Microsoft.AspNetCore.Http.StatusCodes;
|
using static Microsoft.AspNetCore.Http.StatusCodes;
|
||||||
|
|
||||||
namespace API.Controllers;
|
namespace API.Controllers;
|
||||||
@ -17,10 +17,10 @@ public class SettingsController(PgsqlContext context) : Controller
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <response code="200"></response>
|
/// <response code="200"></response>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[ProducesResponseType<string>(StatusCodes.Status200OK, "application/json")]
|
[ProducesResponseType<JObject>(Status200OK, "application/json")]
|
||||||
public IActionResult GetSettings()
|
public IActionResult GetSettings()
|
||||||
{
|
{
|
||||||
return Ok(TrangaSettings.Serialize());
|
return Ok(JObject.Parse(TrangaSettings.Serialize()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user