From f5239864751a8b5b9092af4f605644dcf5b2d42f Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Sun, 26 Apr 2026 17:20:25 +0100 Subject: [PATCH] Cleaned code --- .../Endpoints/RandomChallenges/PatchProofEndpoint.cs | 4 ++-- BeReadyBackend/Endpoints/Users/DeleteUserEndpoint.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BeReadyBackend/Endpoints/RandomChallenges/PatchProofEndpoint.cs b/BeReadyBackend/Endpoints/RandomChallenges/PatchProofEndpoint.cs index 56554e9..b068106 100644 --- a/BeReadyBackend/Endpoints/RandomChallenges/PatchProofEndpoint.cs +++ b/BeReadyBackend/Endpoints/RandomChallenges/PatchProofEndpoint.cs @@ -86,10 +86,10 @@ public class PatchProofEndpoint( Post post = new() { Libelle = req.Libelle, - CreationDate = DateTime.Now, + CreationDate = DateTime.Now, UserId = userId }; - + await postsRepository.AddAsync(post, ct); await Send.NoContentAsync(ct); } diff --git a/BeReadyBackend/Endpoints/Users/DeleteUserEndpoint.cs b/BeReadyBackend/Endpoints/Users/DeleteUserEndpoint.cs index 7813f66..f82da2d 100644 --- a/BeReadyBackend/Endpoints/Users/DeleteUserEndpoint.cs +++ b/BeReadyBackend/Endpoints/Users/DeleteUserEndpoint.cs @@ -20,7 +20,7 @@ public class DeleteUserEndpoint(UsersRepository usersRepository, UserFriendsRepo List friends = await userFriendsRepository.ListAsync(new GetAllFriendsRelationsByIdSpec(userId), ct); await userFriendsRepository.DeleteRangeAsync(friends, ct); - + await usersRepository.DeleteAsync((await usersRepository.SingleOrDefaultAsync(new GetUserByIdSpec(userId), ct))!, ct); await Send.NoContentAsync(ct); }