diff --git a/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java b/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java index 7177887..083b8ff 100644 --- a/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java +++ b/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java @@ -218,7 +218,7 @@ public class Controller { Station aktuelleStation = bearbeitet.getAktuelleStation(); - if(!cache.getStationen().contains(station)) { + if (!cache.getStationen().contains(station)) { return ResponseEntity.status(400).body("The scanned station isnt a part of the cache"); } @@ -231,6 +231,7 @@ public class Controller { } if (cache.getStationen().get(i - 1).equals(aktuelleStation)) { + bearbeitet.setAktuelleStation(station); return ResponseEntity.status(200).body("OK"); } else { return ResponseEntity.status(400).body("The scanned station isn“t the correct following station");