Service fix, add Location and add location to client done

This commit is contained in:
Olivier PARPAILLON
2025-07-09 10:09:17 +02:00
parent b2fffa9f9f
commit 36b6313335
3 changed files with 40 additions and 18 deletions

View File

@@ -12,14 +12,6 @@ public class LocationService {
LocationRepository locationRepository;
public void add(Location location) {
if (location.getRue() == null || location.getCodePostal() == null || location.getVille() == null) {
Location locationTest = new Location();
locationTest.setRue("18 Rue de la Paix");
locationTest.setCodePostal("75000");
locationTest.setVille("Paris");
locationRepository.save(locationTest);
} else {
locationRepository.save(location);
}
locationRepository.save(location);
}
}