diff --git a/src/EllieBot/Modules/Xp/Club/ClubService.cs b/src/EllieBot/Modules/Xp/Club/ClubService.cs index d143ff5..0c63913 100644 --- a/src/EllieBot/Modules/Xp/Club/ClubService.cs +++ b/src/EllieBot/Modules/Xp/Club/ClubService.cs @@ -1,4 +1,3 @@ -#nullable disable using LinqToDB; using LinqToDB.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; @@ -99,9 +98,9 @@ public class ClubService : IEService, IClubService return member; } - public async Task SetClubIconAsync(ulong ownerUserId, string url) + public async Task SetClubIconAsync(ulong ownerUserId, string? url) { - if (url is not null) + if (!string.IsNullOrWhiteSpace(url)) { using var http = _httpFactory.CreateClient(); using var temp = await http.GetAsync(url, HttpCompletionOption.ResponseHeadersRead); @@ -174,7 +173,7 @@ public class ClubService : IEService, IClubService } - public ClubAcceptResult AcceptApplication(ulong clubOwnerUserId, string userName, out DiscordUser discordUser) + public ClubAcceptResult AcceptApplication(ulong clubOwnerUserId, string userName, out DiscordUser? discordUser) { discordUser = null; using var uow = _db.GetDbContext(); @@ -200,7 +199,7 @@ public class ClubService : IEService, IClubService return ClubAcceptResult.Accepted; } - public ClubDenyResult RejectApplication(ulong clubOwnerUserId, string userName, out DiscordUser discordUser) + public ClubDenyResult RejectApplication(ulong clubOwnerUserId, string userName, out DiscordUser? discordUser) { discordUser = null; using var uow = _db.GetDbContext(); @@ -241,7 +240,7 @@ public class ClubService : IEService, IClubService return ClubLeaveResult.Success; } - public bool SetDescription(ulong userId, string desc) + public bool SetDescription(ulong userId, string? desc) { using var uow = _db.GetDbContext(); var club = uow.Set().GetByOwner(userId); diff --git a/src/EllieBot/Modules/Xp/Club/IClubService.cs b/src/EllieBot/Modules/Xp/Club/IClubService.cs index 8a45e8d..863d81f 100644 --- a/src/EllieBot/Modules/Xp/Club/IClubService.cs +++ b/src/EllieBot/Modules/Xp/Club/IClubService.cs @@ -12,8 +12,6 @@ public interface IClubService Task SetClubIconAsync(ulong ownerUserId, string? url); bool GetClubByName(string clubName, out ClubInfo club); ClubApplyResult ApplyToClub(IUser user, ClubInfo club); - ClubAcceptResult AcceptApplication(ulong clubOwnerUserId, string userName, out DiscordUser discordUser); - ClubDenyResult RejectApplication(ulong clubOwnerUserId, string userName, out DiscordUser discordUser); ClubInfo? GetClubWithBansAndApplications(ulong ownerUserId); ClubLeaveResult LeaveClub(IUser user); bool SetDescription(ulong userId, string? desc);