Fixed error with date for random challenge

This commit is contained in:
2026-04-12 14:45:37 +01:00
parent 5e0884a420
commit 34e3fbdd24
2 changed files with 5 additions and 10 deletions
@@ -5,9 +5,9 @@ namespace BeReadyBackend.Specifications.RandomChallenges;
public class GetRandomChallengeByDateSpec : SingleResultSpecification<RandomChallenge>
{
public GetRandomChallengeByDateSpec(DateOnly today)
public GetRandomChallengeByDateSpec()
{
Query
.Where(x => x.GeneratedAt != null && DateOnly.FromDateTime(x.GeneratedAt.Value) == today);
.Where(x => x.GeneratedAt != null && DateOnly.FromDateTime(x.GeneratedAt.Value) == DateOnly.FromDateTime(DateTime.Now));
}
}