Cleaned code

This commit is contained in:
2026-05-14 11:48:20 +01:00
parent f86fd80efc
commit 1fff5f816f
3 changed files with 4 additions and 3 deletions
@@ -28,7 +28,8 @@ public class GetAllPostsEndpoint(PostsRepository postsRepository, UserService us
Likes = x.Likes,
Proof = x.User?.UserRandomChallenges?
.SingleOrDefault(u =>
u.RandomChallenge?.GeneratedAt is not null && DateOnly.FromDateTime(u.RandomChallenge.GeneratedAt.Value) == DateOnly.FromDateTime(x.CreationDate))
u.RandomChallenge?.GeneratedAt is not null
&& DateOnly.FromDateTime(u.RandomChallenge.GeneratedAt.Value) == DateOnly.FromDateTime(x.CreationDate))
?.Proof,
UserId = x.UserId,
Username = x.User?.Username,