Started implementing server installation

This commit is contained in:
2025-02-13 21:23:35 +01:00
parent f45699f300
commit 761ab455f0
11 changed files with 179 additions and 19 deletions

View File

@@ -37,4 +37,15 @@ public class ServerPowerController : Controller
await server.Stop();
}
[HttpPost("{serverId:int}/install")]
public async Task Install(int serverId, [FromQuery] bool runAsync = true)
{
var server = ServerService.GetServer(serverId);
if (server == null)
throw new HttpApiException("No server with this id found", 404);
await server.Install();
}
}