Cleaned code
This commit is contained in:
@@ -86,10 +86,10 @@ public class PatchProofEndpoint(
|
|||||||
Post post = new()
|
Post post = new()
|
||||||
{
|
{
|
||||||
Libelle = req.Libelle,
|
Libelle = req.Libelle,
|
||||||
CreationDate = DateTime.Now,
|
CreationDate = DateTime.Now,
|
||||||
UserId = userId
|
UserId = userId
|
||||||
};
|
};
|
||||||
|
|
||||||
await postsRepository.AddAsync(post, ct);
|
await postsRepository.AddAsync(post, ct);
|
||||||
await Send.NoContentAsync(ct);
|
await Send.NoContentAsync(ct);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class DeleteUserEndpoint(UsersRepository usersRepository, UserFriendsRepo
|
|||||||
|
|
||||||
List<UserFriend> friends = await userFriendsRepository.ListAsync(new GetAllFriendsRelationsByIdSpec(userId), ct);
|
List<UserFriend> friends = await userFriendsRepository.ListAsync(new GetAllFriendsRelationsByIdSpec(userId), ct);
|
||||||
await userFriendsRepository.DeleteRangeAsync(friends, ct);
|
await userFriendsRepository.DeleteRangeAsync(friends, ct);
|
||||||
|
|
||||||
await usersRepository.DeleteAsync((await usersRepository.SingleOrDefaultAsync(new GetUserByIdSpec(userId), ct))!, ct);
|
await usersRepository.DeleteAsync((await usersRepository.SingleOrDefaultAsync(new GetUserByIdSpec(userId), ct))!, ct);
|
||||||
await Send.NoContentAsync(ct);
|
await Send.NoContentAsync(ct);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user