[backend/core] Code cleanup

This commit is contained in:
Laura Hausmann 2024-11-19 19:38:31 +01:00
parent 7eb220b43d
commit 579f8c233a
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -8,7 +8,7 @@ public static class IdHelpers
public static string GenerateSnowflakeId(DateTime? createdAt = null)
{
if (createdAt?.Kind is not null and not DateTimeKind.Utc)
if (createdAt is { Kind: not DateTimeKind.Utc })
createdAt = createdAt.Value.ToUniversalTime();
createdAt ??= DateTime.UtcNow;