mirror of
https://github.com/bitwarden/server.git
synced 2025-07-04 01:22:50 -05:00
[PS-1928] Add BumpAccountRevisionDate
methods (#2458)
* Move RevisionDate Bumps to Extension Class * Add Tests against live databases * Run Formatting * Fix Typo * Fix Test Solution Typo * Await ReplaceAsync
This commit is contained in:
@ -15,11 +15,17 @@ public class SendRepository : Repository<Core.Entities.Send, Send, Guid>, ISendR
|
||||
public override async Task<Core.Entities.Send> CreateAsync(Core.Entities.Send send)
|
||||
{
|
||||
send = await base.CreateAsync(send);
|
||||
if (send.UserId.HasValue)
|
||||
using (var scope = ServiceScopeFactory.CreateScope())
|
||||
{
|
||||
await UserUpdateStorage(send.UserId.Value);
|
||||
await UserBumpAccountRevisionDate(send.UserId.Value);
|
||||
var dbContext = GetDatabaseContext(scope);
|
||||
if (send.UserId.HasValue)
|
||||
{
|
||||
await UserUpdateStorage(send.UserId.Value);
|
||||
await dbContext.UserBumpAccountRevisionDateAsync(send.UserId.Value);
|
||||
await dbContext.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
|
||||
return send;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user