mirror of
https://github.com/CyberL1/Minecraft-Realms-Emulator.git
synced 2024-11-21 21:58: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]
|
[HttpGet]
|
||||||
public ActionResult<List<World>> GetConfiguration()
|
public ActionResult<List<World>> GetWorlds()
|
||||||
{
|
{
|
||||||
var worlds = _context.Worlds.ToList();
|
var worlds = _context.Worlds.ToList();
|
||||||
|
|
||||||
return Ok(worlds);
|
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