deleting the account now also updates the discord mesage
This commit is contained in:
parent
5d05430b89
commit
21ac2db1cd
1 changed files with 5 additions and 0 deletions
|
@ -119,8 +119,13 @@ namespace Lieb.Data
|
|||
await context.SaveChangesAsync();
|
||||
|
||||
IEnumerable<RaidSignUp> signUps = context.RaidSignUps.Where(r => r.LiebUserId == userId);
|
||||
HashSet<int> raidIds = signUps.Select(s => s.RaidId).ToHashSet();
|
||||
context.RemoveRange(signUps);
|
||||
await context.SaveChangesAsync();
|
||||
foreach(int raidId in raidIds)
|
||||
{
|
||||
await _discordService.PostRaidMessage(raidId);
|
||||
}
|
||||
|
||||
IEnumerable<RaidLog> logs = context.RaidLogs.Where(r => r.UserId == userId);
|
||||
foreach(RaidLog log in logs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue