diff --git a/Lieb/Controllers/DiscordBotController.cs b/Lieb/Controllers/DiscordBotController.cs index 56baa16..564e2a7 100644 --- a/Lieb/Controllers/DiscordBotController.cs +++ b/Lieb/Controllers/DiscordBotController.cs @@ -38,7 +38,6 @@ namespace Lieb.Controllers [Route("[action]/{raidId}/{userId}")] public ActionResult IsSignUpAllowed(int raidId, ulong userId) { - Raid raid = _raidService.GetRaid(raidId); if(!_raidService.IsRaidSignUpAllowed(userId, raidId, out string errorMessage)) { return Problem(errorMessage); diff --git a/Lieb/Data/DiscordService.cs b/Lieb/Data/DiscordService.cs index 84f9b11..60586be 100644 --- a/Lieb/Data/DiscordService.cs +++ b/Lieb/Data/DiscordService.cs @@ -243,7 +243,10 @@ namespace Lieb.Data apiReminder.UserIds = new List(); foreach(RaidSignUp signUp in raid.SignUps) { - apiReminder.UserIds.Add(signUp.LiebUserId); + if(signUp.LiebUserId > 0) + { + apiReminder.UserIds.Add(signUp.LiebUserId); + } } return apiReminder; } diff --git a/Lieb/Models/GuildWars2/Raid/RaidReminder.cs b/Lieb/Models/GuildWars2/Raid/RaidReminder.cs index bcd0cc1..d5f3589 100644 --- a/Lieb/Models/GuildWars2/Raid/RaidReminder.cs +++ b/Lieb/Models/GuildWars2/Raid/RaidReminder.cs @@ -18,7 +18,7 @@ namespace Lieb.Models.GuildWars2.Raid [Required] [StringLength(1000, ErrorMessage = "Message too long (1000 character limit).")] - public string Message { get; set; } + public string Message { get; set; } = string.Empty; [Required] public double HoursBeforeRaid { get; set; }