diff --git a/server/src/main/java/com/vpr/server/controller/UserController.java b/server/src/main/java/com/vpr/server/controller/UserController.java index 9c9e27b..82d4d89 100644 --- a/server/src/main/java/com/vpr/server/controller/UserController.java +++ b/server/src/main/java/com/vpr/server/controller/UserController.java @@ -144,7 +144,7 @@ public class UserController { if (user == null) { return new ResponseEntity<>("User nicht in der Datenbank vorhanden", HttpStatus.BAD_REQUEST); } - if(userDAO.deleteAllUserEvents(user.getId())){ + if(!userDAO.deleteAllUserEvents(user.getId())){ return new ResponseEntity<>("User konnte nicht gelöscht werden", HttpStatus.INTERNAL_SERVER_ERROR); } userRepository.delete(user);