Service fix, add Location and add location to client done
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user