mirror of
https://github.com/Caraxi/mare.server.git
synced 2026-01-02 21:33:40 +01:00
potential fixes for userpurge
This commit is contained in:
parent
2b56e3245b
commit
87fdd55c50
3 changed files with 24 additions and 21 deletions
|
|
@ -316,7 +316,7 @@ public partial class MareHub
|
|||
{
|
||||
_logger.LogCallInfo(MareHubLogger.Args(gid, "Deleted"));
|
||||
|
||||
_dbContext.Remove(group);
|
||||
_dbContext.Groups.Remove(group);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public partial class MareHub
|
|||
|
||||
await _authServiceClient.RemoveAuthAsync(new UidMessage() { Uid = userid }).ConfigureAwait(false);
|
||||
|
||||
_dbContext.RemoveRange(ownPairData);
|
||||
_dbContext.ClientPairs.RemoveRange(ownPairData);
|
||||
await _dbContext.SaveChangesAsync().ConfigureAwait(false);
|
||||
var otherPairData = await _dbContext.ClientPairs.Include(u => u.User)
|
||||
.Where(u => u.OtherUser.UID == userid).AsNoTracking().ToListAsync().ConfigureAwait(false);
|
||||
|
|
@ -60,9 +60,9 @@ public partial class MareHub
|
|||
|
||||
_mareMetrics.IncCounter(MetricsAPI.CounterUsersRegisteredDeleted, 1);
|
||||
|
||||
_dbContext.RemoveRange(otherPairData);
|
||||
_dbContext.Remove(userEntry);
|
||||
_dbContext.Remove(auth);
|
||||
_dbContext.ClientPairs.RemoveRange(otherPairData);
|
||||
_dbContext.Users.Remove(userEntry);
|
||||
_dbContext.Auth.Remove(auth);
|
||||
await _dbContext.SaveChangesAsync().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue