diff --git a/Minecraft-Realms-Emulator/Controllers/InvitesController.cs b/Minecraft-Realms-Emulator/Controllers/InvitesController.cs index 38320e9..1b45e4b 100644 --- a/Minecraft-Realms-Emulator/Controllers/InvitesController.cs +++ b/Minecraft-Realms-Emulator/Controllers/InvitesController.cs @@ -2,6 +2,7 @@ using Microsoft.EntityFrameworkCore; using Minecraft_Realms_Emulator.Data; using Minecraft_Realms_Emulator.Entities; +using Minecraft_Realms_Emulator.Requests; using Minecraft_Realms_Emulator.Responses; namespace Minecraft_Realms_Emulator.Controllers @@ -91,7 +92,7 @@ namespace Minecraft_Realms_Emulator.Controllers } [HttpPost("{wId}")] - public async Task> InvitePlayer(int wId, Player body) + public async Task> InvitePlayer(int wId, PlayerRequest body) { string cookie = Request.Headers.Cookie; string playerName = cookie.Split(";")[1].Split("=")[1]; diff --git a/Minecraft-Realms-Emulator/Entities/Player.cs b/Minecraft-Realms-Emulator/Entities/Player.cs index a1bdae8..af84435 100644 --- a/Minecraft-Realms-Emulator/Entities/Player.cs +++ b/Minecraft-Realms-Emulator/Entities/Player.cs @@ -9,6 +9,6 @@ public bool Accepted { get; set; } public bool Online { get; set; } public string Permission { get; set; } = "MEMBER"; - public World? World { get; set; } + public World World { get; set; } } } diff --git a/Minecraft-Realms-Emulator/Requests/PlayerRequest.cs b/Minecraft-Realms-Emulator/Requests/PlayerRequest.cs new file mode 100644 index 0000000..20f9c1a --- /dev/null +++ b/Minecraft-Realms-Emulator/Requests/PlayerRequest.cs @@ -0,0 +1,13 @@ +namespace Minecraft_Realms_Emulator.Requests +{ + public class PlayerRequest + { + public int Id { get; set; } + public string Name { get; set; } = string.Empty; + public string Uuid { get; set; } = string.Empty; + public bool Operator { get; set; } + public bool Accepted { get; set; } + public bool Online { get; set; } + public string Permission { get; set; } = "MEMBER"; + } +}