diff --git a/TorchRemote.Models/Requests/StopServerRequest.cs b/TorchRemote.Models/Requests/StopServerRequest.cs index 31a6f26..f38bdbd 100644 --- a/TorchRemote.Models/Requests/StopServerRequest.cs +++ b/TorchRemote.Models/Requests/StopServerRequest.cs @@ -1,3 +1,3 @@ namespace TorchRemote.Models.Requests; -public record StopServerRequest(bool Save = true); +public record StopServerRequest(bool Save); diff --git a/TorchRemote.Plugin/Controllers/ServerController.cs b/TorchRemote.Plugin/Controllers/ServerController.cs index 177544b..a08afbf 100644 --- a/TorchRemote.Plugin/Controllers/ServerController.cs +++ b/TorchRemote.Plugin/Controllers/ServerController.cs @@ -34,7 +34,7 @@ public class ServerController : WebApiController } [Route(HttpVerbs.Post, $"{RootPath}/stop")] - public async Task Stop(StopServerRequest request) + public async Task Stop([JsonData] StopServerRequest request) { if (!Statics.Torch.IsRunning) throw HttpException.BadRequest($"Server can't stop in state {Statics.Torch.State}", Statics.Torch.State);