Browse Source

fix delete route

tripeur 4 years ago
parent
commit
35c91c60a7

+ 1 - 1
src/main/java/fr/jaquin/bdlg/planner/controller/ApiController.java

@@ -75,7 +75,7 @@ public class ApiController {
   @DeleteMapping("/evenements/history/{uuid}/content/{id}")
   boolean deleteHistoryEvenement(@PathVariable String uuid, @PathVariable Long id) {
     Optional<Evenement> evt = repository.findById(id);
-    if (evt.isEmpty()) {
+    if (!evt.isPresent()) {
       return false;
     }
     if (evt.get().getUuid().equals(uuid)) {