From ae8a33b7b6aa9e11a0726b0b978d5d422d5040ef Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Mon, 23 Mar 2026 23:41:10 +0100 Subject: [PATCH] fixed error with logic to vote at the end of challenge --- BeReadyBackend/Endpoints/Groups/PatchVoteEndpoint.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BeReadyBackend/Endpoints/Groups/PatchVoteEndpoint.cs b/BeReadyBackend/Endpoints/Groups/PatchVoteEndpoint.cs index 104f490..9a6942f 100644 --- a/BeReadyBackend/Endpoints/Groups/PatchVoteEndpoint.cs +++ b/BeReadyBackend/Endpoints/Groups/PatchVoteEndpoint.cs @@ -36,7 +36,7 @@ public class PatchVoteEndpoint(UserGroupsRepository userGroupsRepository, UserSe return; } - if (member.Group!.StartedVote is not null && member.Group.StartedVote.Value.AddHours(member.Group.VoteDuration) > DateTime.Now) + if (member.Group!.StartedVote is not null && member.Group.StartedVote.Value.AddHours(member.Group.VoteDuration) < DateTime.Now) { await Send.StringAsync("Le vote est terminé", 400, cancellation: ct); return;