From 99d29ffdec717ad232fca226734cf5de8776a02b Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Apr 2019 15:45:53 +0200 Subject: [PATCH] added comments --- .../java/hhn/labsw/bugageocaching/controller/Controller.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java b/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java index 8c5af5c..f04c688 100644 --- a/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java +++ b/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java @@ -148,6 +148,7 @@ public class Controller { @ResponseBody public ResponseEntity createCache(@RequestBody Cache cache) { + // Stationen werden in die Datenbank eingetragen for (Station station : cache.getStationen()) { ResponseEntity response = createStation(station); if (response.getStatusCodeValue() == 400) { @@ -156,6 +157,7 @@ public class Controller { } } + // Caches werden in die Datenbank eingetragen if (cache.getDescription().length() == 0 || cache.getName().length() == 0 || cache.getRankingPoints() == 0.0 || cache.getStationen().size() == 0) { deleteStationen(cache); return ResponseEntity.status(400).body("cache fields can“t be empty");