🐛 Fix file reference created with wrong date

This commit is contained in:
2025-12-02 21:03:57 +08:00
parent 2cce5ebf80
commit fa2f53ff7a
5 changed files with 8 additions and 5 deletions

View File

@@ -13,9 +13,10 @@ public class ActionLogFlushHandler(IServiceProvider serviceProvider) : IFlushHan
using var scope = serviceProvider.CreateScope();
var db = scope.ServiceProvider.GetRequiredService<AppDatabase>();
var now = SystemClock.Instance.GetCurrentInstant();
await db.BulkInsertAsync(items.Select(x =>
{
x.CreatedAt = SystemClock.Instance.GetCurrentInstant();
x.CreatedAt = now;
x.UpdatedAt = x.CreatedAt;
return x;
}), config => config.ConflictOption = ConflictOption.Ignore);