forked from Sarah/Lieb-Website
reformated PollOptions
used HashSet for PollUsers
This commit is contained in:
parent
1f5a1f4fe2
commit
7e87500992
3 changed files with 36 additions and 19 deletions
|
@ -73,11 +73,11 @@ namespace Lieb.Data
|
|||
.FirstOrDefault(r => r.RaidId == raidId);
|
||||
|
||||
if (raid == null) return 0;
|
||||
List<ulong> users = raid.SignUps.Where(s => s.LiebUserId != null).Select(s => (ulong)s.LiebUserId).ToList();
|
||||
HashSet<ulong> users = raid.SignUps.Where(s => s.LiebUserId != null).Select(s => (ulong)s.LiebUserId).ToHashSet();
|
||||
return await CreatePoll(poll, users, raidId);
|
||||
}
|
||||
|
||||
public async Task<int> CreatePoll(Poll poll, List<ulong> users, int? raidId = null)
|
||||
public async Task<int> CreatePoll(Poll poll, HashSet<ulong> users, int? raidId = null)
|
||||
{
|
||||
poll.RaidId = raidId;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue