Cleaned code

This commit is contained in:
2026-05-14 18:49:35 +01:00
parent e6d47a4005
commit 75876b3ab3
4 changed files with 5 additions and 5 deletions
@@ -6,7 +6,7 @@ using FastEndpoints;
namespace BeReadyBackend.Endpoints.Friends;
public class GetAllFriendRequestsEndpoint(UserFriendsRepository userFriendsRepository, UserService userService): EndpointWithoutRequest<List<GetFriendRequestDto>>
public class GetAllFriendRequestsEndpoint(UserFriendsRepository userFriendsRepository, UserService userService) : EndpointWithoutRequest<List<GetFriendRequestDto>>
{
public override void Configure()
{
@@ -80,7 +80,7 @@ public class PatchProofEndpoint(
user.TotalChallenge++;
UserRandomChallenge? lastChallenge = await userRandomChallengesRepository.SingleOrDefaultAsync(new GetLastRandomChallengeSpec(userId), ct);
if (lastChallenge is not null || user.Series == 0) user.Series++;
else user.Series = 1;
@@ -92,7 +92,7 @@ public class PatchProofEndpoint(
CreationDate = DateTime.Now,
Libelle = randomChallenge.Label,
UserId = userId,
RandomChallengeId = req.RandomChallengeId,
RandomChallengeId = req.RandomChallengeId,
};
await postsRepository.AddAsync(post, ct);
+1 -1
View File
@@ -11,7 +11,7 @@ public class Post
public User? User { get; set; }
[Required] public int UserId { get; set; }
public RandomChallenge? RandomChallenge { get; set; }
[Required] public int RandomChallengeId { get; set; }
@@ -129,7 +129,7 @@ public class AchievementService(
switch (achievementsCounter)
{
case 5:
await Unlock(userId,22);
await Unlock(userId, 22);
break;
case 20:
await Unlock(userId, 23);