Browse Source

updated destroy method

Leon 5 years ago
parent
commit
c4dfe6cefd

+ 1
- 1
src/main/java/com/zipcodewilmington/bakery/Controllers/BakerController.java View File

@@ -30,7 +30,7 @@ public class BakerController {
30 30
     }
31 31
 
32 32
     public ResponseEntity<Boolean> destroy(Long id) {
33
-        this.bakerRepository.findById(id).get();
33
+        this.bakerRepository.deleteById(id);
34 34
         return new ResponseEntity<>(true, HttpStatus.OK);
35 35
     }
36 36
 }