From de45bf843e64eb3dd723a6123367caed604f8fa2 Mon Sep 17 00:00:00 2001 From: CyberL1 Date: Sun, 14 Jul 2024 21:07:49 +0200 Subject: [PATCH] fix(server): updating realm with empty description should work now --- Minecraft-Realms-Emulator/Modes/External/WorldsController.cs | 2 +- .../Modes/Realms/Controllers/WorldsController.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Minecraft-Realms-Emulator/Modes/External/WorldsController.cs b/Minecraft-Realms-Emulator/Modes/External/WorldsController.cs index bfd665e..a729e3b 100644 --- a/Minecraft-Realms-Emulator/Modes/External/WorldsController.cs +++ b/Minecraft-Realms-Emulator/Modes/External/WorldsController.cs @@ -678,7 +678,7 @@ namespace Minecraft_Realms_Emulator.Modes.External return BadRequest(errorResponse); } - if (body.Description.Length > 32) + if (body.Description?.Length > 32) { ErrorResponse errorResponse = new() { diff --git a/Minecraft-Realms-Emulator/Modes/Realms/Controllers/WorldsController.cs b/Minecraft-Realms-Emulator/Modes/Realms/Controllers/WorldsController.cs index cb21e17..0cafc8d 100644 --- a/Minecraft-Realms-Emulator/Modes/Realms/Controllers/WorldsController.cs +++ b/Minecraft-Realms-Emulator/Modes/Realms/Controllers/WorldsController.cs @@ -731,7 +731,7 @@ namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers return BadRequest(errorResponse); } - if (body.Description.Length > 32) + if (body.Description?.Length > 32) { ErrorResponse errorResponse = new() {