mirror of
https://github.com/CyberL1/Minecraft-Realms-Emulator.git
synced 2024-11-21 21:58:21 -05:00
Remove redundant stuff
This commit is contained in:
parent
1377f7e5a1
commit
007132bab3
@ -137,14 +137,10 @@ namespace Minecraft_Realms_Emulator.Controllers
|
||||
[HttpDelete("{wId}/invite/{uuid}")]
|
||||
public async Task<ActionResult<bool>> DeleteInvite(int wId, string uuid)
|
||||
{
|
||||
Console.WriteLine($"{wId} - {uuid}");
|
||||
|
||||
var world = await _context.Worlds.FirstOrDefaultAsync(w => w.Id == wId);
|
||||
|
||||
if (world == null) return NotFound("World not found");
|
||||
|
||||
var players = world.Players.ToList();
|
||||
|
||||
var player = _context.Players.Where(p => p.World.Id == wId).FirstOrDefault(p => p.Uuid == uuid);
|
||||
|
||||
_context.Players.Remove(player);
|
||||
@ -168,8 +164,6 @@ namespace Minecraft_Realms_Emulator.Controllers
|
||||
|
||||
if (world == null) return NotFound("World not found");
|
||||
|
||||
var players = world.Players.ToList();
|
||||
|
||||
var player = _context.Players.Where(p => p.World.Id == wId).FirstOrDefault(p => p.Uuid == playerUUID);
|
||||
|
||||
_context.Players.Remove(player);
|
||||
|
Loading…
Reference in New Issue
Block a user