refactoring
This commit is contained in:
@@ -249,7 +249,7 @@ public class ClientService {
|
||||
public void delete(UUID id) {
|
||||
logger.info("Suppression logique du client avec l'ID: {}", id);
|
||||
|
||||
Client client = findByIdRequired(id);
|
||||
findByIdRequired(id);
|
||||
clientRepository.softDelete(id);
|
||||
|
||||
logger.info("Client supprimé avec succès");
|
||||
@@ -259,9 +259,8 @@ public class ClientService {
|
||||
public void deleteByEmail(String email) {
|
||||
logger.info("Suppression logique du client avec l'email: {}", email);
|
||||
|
||||
Client client =
|
||||
findByEmail(email)
|
||||
.orElseThrow(() -> new NotFoundException("Client non trouvé avec l'email: " + email));
|
||||
findByEmail(email)
|
||||
.orElseThrow(() -> new NotFoundException("Client non trouvé avec l'email: " + email));
|
||||
|
||||
clientRepository.softDeleteByEmail(email);
|
||||
logger.info("Client supprimé avec succès");
|
||||
|
||||
Reference in New Issue
Block a user