added comments
This commit is contained in:
parent
5bf05616c8
commit
99d29ffdec
@ -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");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user