a cache needs atleast 2 stations now(start and endstation)
This commit is contained in:
parent
1c602c1dab
commit
9828f88f7b
@ -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");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user