[backend/api] Fix session createdAt being populated as -infinity

This commit is contained in:
Laura Hausmann 2024-04-03 21:48:35 +02:00
parent 66675146d9
commit 22cf408d6c
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -67,7 +67,7 @@ public class AuthController(DatabaseContext db, UserService userSvc, UserRendere
Id = IdHelpers.GenerateSlowflakeId(), Id = IdHelpers.GenerateSlowflakeId(),
UserId = user.Id, UserId = user.Id,
Active = !profile.TwoFactorEnabled, Active = !profile.TwoFactorEnabled,
CreatedAt = new DateTime(), CreatedAt = DateTime.UtcNow,
Token = CryptographyHelpers.GenerateRandomString(32) Token = CryptographyHelpers.GenerateRandomString(32)
}; };
await db.AddAsync(session); await db.AddAsync(session);