From 9828f88f7b3fee9f9a87f8b7994d34fa9c6162fb Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 11 Apr 2019 02:56:01 +0200 Subject: [PATCH] a cache needs atleast 2 stations now(start and endstation) --- .../java/hhn/labsw/bugageocaching/controller/Controller.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java b/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java index c698928..c0b73b3 100644 --- a/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java +++ b/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java @@ -212,7 +212,7 @@ public class Controller { } System.out.println("Stationen eingetragen!"); // Caches werden in die Datenbank eingetragen - if (cache.getDescription().length() == 0 || cache.getName().length() == 0 || cache.getRankingPoints() == 0.0 || cache.getStationen().size() == 0) { + if (cache.getDescription().length() == 0 || cache.getName().length() == 0 || cache.getRankingPoints() == 0.0 || cache.getStationen().size() < 2) { deleteStationen(cache); return ResponseEntity.status(400).body("cache fields can“t be empty"); }