Commit 7398996fc137cd185ff76fe325f08d733017b3f6
1 parent
0fd5cbb2
Correction /consommation
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
src/main/java/etunicorn/controller/ConsommationController.java
... | ... | @@ -51,7 +51,7 @@ public class ConsommationController extends BaseController implements etunicorn. |
51 | 51 | |
52 | 52 | @Override |
53 | 53 | @RestrictedTo("CONSO_EDIT") |
54 | - public ResponseEntity<?> updateConsommationById(@PathVariable Long consommationId, @Valid @RequestBody UpdateConsommationByIdRequest updateConsommationByIdRequest) { | |
54 | + public ResponseEntity<?> updateConsommationById(@PathVariable Long consommationId, @PathVariable String idConsommation, @Valid @RequestBody UpdateConsommationByIdRequest updateConsommationByIdRequest) { | |
55 | 55 | Consommation consommation = consommationRepository.findById(consommationId.intValue()); |
56 | 56 | if (consommation == null) { |
57 | 57 | return generateError(HttpStatus.NOT_FOUND, "Consommation inconnue"); |
... | ... | @@ -64,7 +64,7 @@ public class ConsommationController extends BaseController implements etunicorn. |
64 | 64 | |
65 | 65 | @Override |
66 | 66 | @RestrictedTo("CONSO_GET") |
67 | - public ResponseEntity<?> getConsommationById(@PathVariable Long consommationId) { | |
67 | + public ResponseEntity<?> getConsommationById(@PathVariable Long consommationId, @PathVariable String idConsommation) { | |
68 | 68 | Consommation consommation = consommationRepository.findById(consommationId.intValue()); |
69 | 69 | if (consommation == null) { |
70 | 70 | return generateError(HttpStatus.NOT_FOUND, "Consommation inconnue"); |
... | ... | @@ -74,7 +74,7 @@ public class ConsommationController extends BaseController implements etunicorn. |
74 | 74 | |
75 | 75 | @Override |
76 | 76 | @RestrictedTo("CONSO_REMOVE") |
77 | - public ResponseEntity<?> deleteConsommationById(@PathVariable Long consommationId) { | |
77 | + public ResponseEntity<?> deleteConsommationById(@PathVariable Long consommationId, @PathVariable String idConsommation) { | |
78 | 78 | Consommation consommation = consommationRepository.findById(consommationId.intValue()); |
79 | 79 | if (consommation == null) { |
80 | 80 | return generateError(HttpStatus.NOT_FOUND, "Consommation inconnue"); |
... | ... | @@ -85,7 +85,7 @@ public class ConsommationController extends BaseController implements etunicorn. |
85 | 85 | |
86 | 86 | @Override |
87 | 87 | @RestrictedTo("CONSO_ACHAT") |
88 | - public ResponseEntity<?> updateAchete(@PathVariable Long consommationId, @Valid @RequestBody UpdateAcheteRequest updateAcheteRequest) { | |
88 | + public ResponseEntity<?> updateAchete(@PathVariable Long consommationId, @PathVariable String idConsommation, @Valid @RequestBody UpdateAcheteRequest updateAcheteRequest) { | |
89 | 89 | return null; |
90 | 90 | } |
91 | 91 | } | ... | ... |