mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-15 00:04:14 +01:00
OneTime Invites Server handling (#17)
* add server-side handling for one time invites
This commit is contained in:
parent
c13e457780
commit
d83d9a6753
10 changed files with 1206 additions and 2 deletions
|
|
@ -109,6 +109,16 @@ public class CleanupService : IHostedService, IDisposable
|
|||
_logger.LogWarning(ex, "Error during user purge");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var tempInvites = await dbContext.GroupTempInvites.ToListAsync();
|
||||
dbContext.RemoveRange(tempInvites.Where(i => i.ExpirationDate < DateTime.UtcNow));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogWarning(ex, "Error during Temp Invite purge");
|
||||
}
|
||||
|
||||
_authService.ClearUnauthorizedUsers();
|
||||
|
||||
_logger.LogInformation($"Cleanup complete");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue