fix stop server request serialization

This commit is contained in:
zznty
2022-07-21 22:03:20 +07:00
parent bc4546410e
commit 10dfe63b9c
2 changed files with 2 additions and 2 deletions

View File

@@ -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);