feat: get a single world from admin api

This commit is contained in:
CyberL1 2024-05-28 11:59:23 +02:00
parent 054b816652
commit 21635d53c2

View File

@ -18,11 +18,18 @@ namespace Minecraft_Realms_Emulator.Controllers.Admin
}
[HttpGet]
public ActionResult<List<World>> GetConfiguration()
public ActionResult<List<World>> GetWorlds()
{
var worlds = _context.Worlds.ToList();
return Ok(worlds);
}
[HttpGet("{wId}")]
public ActionResult<World> GetWorld(int wId) {
var world = _context.Worlds.ToList().Find(w => w.Id == wId);
return Ok(world);
}
}
}