deleteCache deletes all stations related to taht cache now

This commit is contained in:
Michael 2019-04-11 02:54:53 +02:00
parent 1c7a34a735
commit 1c602c1dab

View File

@ -335,6 +335,10 @@ public class Controller {
} }
} }
for(Station station : cache.getStationen()) {
stationRepository.delete(station);
}
cacheRepository.delete(cache); cacheRepository.delete(cache);
return ResponseEntity.status(200).body(new Gson().toJson(true)); return ResponseEntity.status(200).body(new Gson().toJson(true));