diff --git a/API/Controllers/SettingsController.cs b/API/Controllers/SettingsController.cs index 6da2177..b4deaeb 100644 --- a/API/Controllers/SettingsController.cs +++ b/API/Controllers/SettingsController.cs @@ -272,4 +272,28 @@ public class SettingsController(IServiceScope scope) : Controller RequestResult result = client.MakeRequestInternal(knownProtectedUrl); return (int)result.statusCode >= 200 && (int)result.statusCode < 300 ? Ok() : StatusCode(500, result.statusCode); } + + /// + /// Returns the language in which Manga are downloaded + /// + /// + [HttpGet("DownloadLanguage")] + [ProducesResponseType(Status200OK, "text/plain")] + public IActionResult GetDownloadLanguage() + { + return Ok(Tranga.Settings.DownloadLanguage); + } + + /// + /// Sets the language in which Manga are downloaded + /// + /// + [HttpPatch("DownloadLanguage/{Language}")] + [ProducesResponseType(Status200OK)] + public IActionResult SetDownloadLanguage(string Language) + { + //TODO Validation + Tranga.Settings.SetDownloadLanguage(Language); + return Ok(); + } } \ No newline at end of file