mirror of
https://github.com/CyberL1/Minecraft-Realms-Emulator.git
synced 2024-11-21 13:48:21 -05:00
feat: get a single world from admin api
This commit is contained in:
parent
054b816652
commit
21635d53c2
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user