From 21635d53c2026c339b79ae8cd38f9184fd314930 Mon Sep 17 00:00:00 2001 From: CyberL1 Date: Tue, 28 May 2024 11:59:23 +0200 Subject: [PATCH] feat: get a single world from admin api --- .../Controllers/Admin/ServersController.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Minecraft-Realms-Emulator/Controllers/Admin/ServersController.cs b/Minecraft-Realms-Emulator/Controllers/Admin/ServersController.cs index 6bac87b..ba97739 100644 --- a/Minecraft-Realms-Emulator/Controllers/Admin/ServersController.cs +++ b/Minecraft-Realms-Emulator/Controllers/Admin/ServersController.cs @@ -18,11 +18,18 @@ namespace Minecraft_Realms_Emulator.Controllers.Admin } [HttpGet] - public ActionResult> GetConfiguration() + public ActionResult> GetWorlds() { var worlds = _context.Worlds.ToList(); return Ok(worlds); } + + [HttpGet("{wId}")] + public ActionResult GetWorld(int wId) { + var world = _context.Worlds.ToList().Find(w => w.Id == wId); + + return Ok(world); + } } } \ No newline at end of file