diff --git a/ArmaForces.ArmaServerManager/Api/Servers/ServersController.cs b/ArmaForces.ArmaServerManager/Api/Servers/ServersController.cs index 4bc829b..57456aa 100644 --- a/ArmaForces.ArmaServerManager/Api/Servers/ServersController.cs +++ b/ArmaForces.ArmaServerManager/Api/Servers/ServersController.cs @@ -118,7 +118,7 @@ public async Task SetHeadlessClients(int port, HeadlessSetRequest return result.Match( onSuccess: NoContent, - onFailure: error => (IActionResult) BadRequest(error)); + onFailure: error => (IActionResult) NotFound(error)); } /// Restart Server @@ -127,6 +127,7 @@ public async Task SetHeadlessClients(int port, HeadlessSetRequest /// Additional details. [HttpPost("{port:int}/restart", Name = nameof(RestartServer))] [ProducesResponseType(typeof(int), StatusCodes.Status202Accepted)] + [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] [ProducesResponseType(typeof(string), StatusCodesExtended.Status425TooEarly)] [ProducesResponseType(typeof(string), StatusCodes.Status500InternalServerError)] [ApiKey] @@ -134,7 +135,7 @@ public IActionResult RestartServer(int port, ServerRestartRequestDto serverResta { var serverGetResult = _serverQueryLogic.GetServer(port); - if (serverGetResult.IsFailure) return BadRequest("Server is not running and cannot be restarted."); + if (serverGetResult.IsFailure) return NotFound("Server is not running and cannot be restarted."); var server = serverGetResult.Value;