mirror of
https://github.com/CyberL1/Minecraft-Realms-Emulator.git
synced 2024-11-21 21:58:21 -05:00
feat: expired realm deleting
This commit is contained in:
parent
3e9b6a55de
commit
91b62581c9
@ -297,5 +297,18 @@ namespace Minecraft_Realms_Emulator.Controllers
|
|||||||
|
|
||||||
return Ok(connection);
|
return Ok(connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpDelete("{wId}")]
|
||||||
|
public ActionResult<bool> DeleteRealm(int wId)
|
||||||
|
{
|
||||||
|
var world = _context.Worlds.Find(wId);
|
||||||
|
|
||||||
|
if (world == null) return NotFound("World not found");
|
||||||
|
|
||||||
|
_context.Worlds.Remove(world);
|
||||||
|
_context.SaveChanges();
|
||||||
|
|
||||||
|
return Ok(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user