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