From ff1df20b1f69b9f68bebdca7d6db12fe7477608f Mon Sep 17 00:00:00 2001 From: Blandine Bajard <83599148+BlandineBajard@users.noreply.github.com> Date: Tue, 1 Mar 2022 17:45:51 +0100 Subject: [PATCH] order by date menu --- src/main/java/fr/organizee/controller/MenuController.java | 2 +- src/main/java/fr/organizee/model/Menu.java | 2 +- src/main/java/fr/organizee/repository/MenuRepository.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/fr/organizee/controller/MenuController.java b/src/main/java/fr/organizee/controller/MenuController.java index 4b18a32..67dd0b9 100644 --- a/src/main/java/fr/organizee/controller/MenuController.java +++ b/src/main/java/fr/organizee/controller/MenuController.java @@ -67,7 +67,7 @@ public class MenuController { } //Mise a jour d'un menu par son ID - @PutMapping("/update/{team_id}/{id}") + @PutMapping(value="/update/{team_id}/{id}", produces="application/json", consumes= "application/json") //@PreAuthorize("hasRole('ROLE_PARENT')") public ResponseEntity> updateMenu(@RequestBody Menu menu, @PathVariable Integer team_id, @PathVariable Integer id) throws Exception { Menu resultMenu = null; diff --git a/src/main/java/fr/organizee/model/Menu.java b/src/main/java/fr/organizee/model/Menu.java index 4be974c..6f182b8 100644 --- a/src/main/java/fr/organizee/model/Menu.java +++ b/src/main/java/fr/organizee/model/Menu.java @@ -15,7 +15,7 @@ public class Menu { private String repasSoir; @ManyToOne @JoinColumn(name="TEAM_ID") - @JsonIgnoreProperties({"menu","membre"}) + @JsonIgnoreProperties({"menu"}) private Team team; public Menu() { diff --git a/src/main/java/fr/organizee/repository/MenuRepository.java b/src/main/java/fr/organizee/repository/MenuRepository.java index 7c5d0cb..d1fc7df 100644 --- a/src/main/java/fr/organizee/repository/MenuRepository.java +++ b/src/main/java/fr/organizee/repository/MenuRepository.java @@ -12,7 +12,7 @@ import java.util.List; @Repository public interface MenuRepository extends JpaRepository