fix: default value is null for optional body
This commit is contained in:
parent
fdf0ecc9ef
commit
32621515db
@ -206,7 +206,7 @@ public class SetupController(ISetupToken setupToken, IMaintenanceModeNotConfigur
|
|||||||
[HttpPost("SetLogging")]
|
[HttpPost("SetLogging")]
|
||||||
[TokenAuthentication]
|
[TokenAuthentication]
|
||||||
[BadRequestResponse]
|
[BadRequestResponse]
|
||||||
public ActionResult<bool> SetLogging([FromBody] LoggingRequest? request)
|
public ActionResult<bool> SetLogging([FromBody] LoggingRequest? request = null)
|
||||||
{
|
{
|
||||||
var settings = (request == null) switch
|
var settings = (request == null) switch
|
||||||
{
|
{
|
||||||
@ -234,7 +234,7 @@ public class SetupController(ISetupToken setupToken, IMaintenanceModeNotConfigur
|
|||||||
[HttpPost("SetEmail")]
|
[HttpPost("SetEmail")]
|
||||||
[TokenAuthentication]
|
[TokenAuthentication]
|
||||||
[BadRequestResponse]
|
[BadRequestResponse]
|
||||||
public ActionResult<bool> SetEmail([FromBody] EmailRequest? request)
|
public ActionResult<bool> SetEmail([FromBody] EmailRequest? request = null)
|
||||||
{
|
{
|
||||||
var settings = (request == null) switch
|
var settings = (request == null) switch
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user