From b3ee30a9cc4ac5e03a14f9b736b1a7defaeb546a Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Thu, 14 May 2026 14:22:08 +0100 Subject: [PATCH] fixed error with foreign key in post --- .../Endpoints/RandomChallenges/PatchProofEndpoint.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BeReadyBackend/Endpoints/RandomChallenges/PatchProofEndpoint.cs b/BeReadyBackend/Endpoints/RandomChallenges/PatchProofEndpoint.cs index e0b627e..fa7b18d 100644 --- a/BeReadyBackend/Endpoints/RandomChallenges/PatchProofEndpoint.cs +++ b/BeReadyBackend/Endpoints/RandomChallenges/PatchProofEndpoint.cs @@ -85,8 +85,9 @@ public class PatchProofEndpoint( Post post = new() { CreationDate = DateTime.Now, - Libelle = "test pour le moment", - UserId = userId + Libelle = randomChallenge.Label, + UserId = userId, + RandomChallengeId = req.RandomChallengeId, }; await postsRepository.AddAsync(post, ct);