mirror of
https://github.com/C9Glax/tranga.git
synced 2025-04-12 19:36:08 +02:00
Fix Settings Endpoints (FromBody tags)
This commit is contained in:
parent
f2961711cf
commit
3981a41303
@ -142,7 +142,7 @@ public class SettingsController(PgsqlContext context) : Controller
|
||||
[HttpPatch("ImageCompression")]
|
||||
[ProducesResponseType(Status200OK)]
|
||||
[ProducesResponseType(Status400BadRequest)]
|
||||
public IActionResult SetImageCompression(int level)
|
||||
public IActionResult SetImageCompression([FromBody]int level)
|
||||
{
|
||||
if (level < 0 || level > 100)
|
||||
return BadRequest();
|
||||
@ -168,7 +168,7 @@ public class SettingsController(PgsqlContext context) : Controller
|
||||
/// <response code="200"></response>
|
||||
[HttpPatch("BWImages")]
|
||||
[ProducesResponseType(Status200OK)]
|
||||
public IActionResult SetBwImagesToggle(bool enabled)
|
||||
public IActionResult SetBwImagesToggle([FromBody]bool enabled)
|
||||
{
|
||||
TrangaSettings.UpdateBwImages(enabled);
|
||||
return Ok();
|
||||
@ -194,7 +194,7 @@ public class SettingsController(PgsqlContext context) : Controller
|
||||
/// <response code="200"></response>
|
||||
[HttpPatch("AprilFoolsMode")]
|
||||
[ProducesResponseType(Status200OK)]
|
||||
public IActionResult SetAprilFoolsMode(bool enabled)
|
||||
public IActionResult SetAprilFoolsMode([FromBody]bool enabled)
|
||||
{
|
||||
TrangaSettings.UpdateAprilFoolsMode(enabled);
|
||||
return Ok();
|
||||
|
Loading…
x
Reference in New Issue
Block a user