From 5ca12b1530ccf93f3b27ad97d9f3022874c945b7 Mon Sep 17 00:00:00 2001 From: CyberL1 Date: Wed, 22 May 2024 07:40:30 +0200 Subject: [PATCH] fix: id -> wId --- MyMcRealms/Controllers/WorldsController.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/MyMcRealms/Controllers/WorldsController.cs b/MyMcRealms/Controllers/WorldsController.cs index eb94cd3..f8fd5bc 100644 --- a/MyMcRealms/Controllers/WorldsController.cs +++ b/MyMcRealms/Controllers/WorldsController.cs @@ -147,18 +147,18 @@ namespace MyMcRealms.Controllers [HttpPost("{wId}/reset")] [CheckRealmOwner] - public ActionResult ChangeSlot(int id) + public ActionResult ChangeSlot(int wId) { return BadRequest("lol nice try"); } - [HttpPut("{id}/open")] + [HttpPut("{wId}/open")] [CheckRealmOwner] - public async Task> Open(int id) + public async Task> Open(int wId) { var _api = new MyMcAPI.Wrapper(Environment.GetEnvironmentVariable("MYMC_API_KEY")); - var world = (await _api.GetAllServers()).Servers[id]; + var world = (await _api.GetAllServers()).Servers[wId]; var api = new MyMcAPI.Wrapper(world.OwnersToken); if (world == null) return NotFound("World not found"); @@ -168,13 +168,13 @@ namespace MyMcRealms.Controllers return Ok(true); } - [HttpPut("{id}/close")] + [HttpPut("{wId}/close")] [CheckRealmOwner] - public async Task> Close(int id) + public async Task> Close(int wId) { var _api = new MyMcAPI.Wrapper(Environment.GetEnvironmentVariable("MYMC_API_KEY")); - var world = (await _api.GetAllServers()).Servers[id]; + var world = (await _api.GetAllServers()).Servers[wId]; var api = new MyMcAPI.Wrapper(world.OwnersToken); if (world == null) return NotFound("World not found");