mirror of
https://github.com/CyberL1/Minecraft-Realms-Emulator.git
synced 2024-12-21 20:08:21 -05:00
fix(server): properly close/open server trough admin api
This commit is contained in:
parent
51251ee5a1
commit
bf2d2ff641
@ -65,6 +65,9 @@ namespace Minecraft_Realms_Emulator.Controllers.Admin
|
||||
|
||||
if (world == null) return BadRequest("World not found");
|
||||
|
||||
world.State = "OPEN";
|
||||
_context.SaveChanges();
|
||||
|
||||
new DockerHelper(world).StartServer();
|
||||
|
||||
return Ok(true);
|
||||
@ -77,6 +80,9 @@ namespace Minecraft_Realms_Emulator.Controllers.Admin
|
||||
|
||||
if (world == null) return BadRequest("World not found");
|
||||
|
||||
world.State = "CLOSED";
|
||||
_context.SaveChanges();
|
||||
|
||||
new DockerHelper(world).StopServer();
|
||||
|
||||
return Ok(true);
|
||||
|
Loading…
Reference in New Issue
Block a user