Commit 4ceffe1ed35940d74e1d21e3dba3adfeabf063f4
1 parent
6b23f1ca
Correction /consommation tris
Showing
2 changed files
with
10 additions
and
10 deletions
Show diff stats
api.raml
... | ... | @@ -345,7 +345,7 @@ version: v1 |
345 | 345 | description: L'évènement a bien été créé |
346 | 346 | /{idEvenement}: |
347 | 347 | uriParameters: |
348 | - evenementId: | |
348 | + idEvenement: | |
349 | 349 | type: integer |
350 | 350 | required: true |
351 | 351 | description: ID de l'evenement |
... | ... | @@ -399,7 +399,7 @@ version: v1 |
399 | 399 | 404: |
400 | 400 | description: Evenement non existant |
401 | 401 | delete: |
402 | - description: Permet de supprimer l'evenement {evenementId}. Nécessite EVNMT_REMOVE | |
402 | + description: Permet de supprimer l'evenement. Nécessite EVNMT_REMOVE | |
403 | 403 | responses: |
404 | 404 | 200: |
405 | 405 | description: L'evenement a été bien supprimé |
... | ... | @@ -496,7 +496,7 @@ version: v1 |
496 | 496 | 201: |
497 | 497 | /{idConsommation}: |
498 | 498 | uriParameters: |
499 | - consommationId: | |
499 | + idConsommation: | |
500 | 500 | type: integer |
501 | 501 | required: true |
502 | 502 | description: id de la consommation | ... | ... |
src/main/java/etunicorn/controller/ConsommationController.java
... | ... | @@ -51,8 +51,8 @@ public class ConsommationController extends BaseController implements etunicorn. |
51 | 51 | |
52 | 52 | @Override |
53 | 53 | @RestrictedTo("CONSO_EDIT") |
54 | - public ResponseEntity<?> updateConsommationById(@PathVariable Long consommationId, @PathVariable String idConsommation, @Valid @RequestBody UpdateConsommationByIdRequest updateConsommationByIdRequest) { | |
55 | - Consommation consommation = consommationRepository.findById(consommationId.intValue()); | |
54 | + public ResponseEntity<?> updateConsommationById(@PathVariable Long idConsommation, @Valid @RequestBody UpdateConsommationByIdRequest updateConsommationByIdRequest) { | |
55 | + Consommation consommation = consommationRepository.findById(idConsommation.intValue()); | |
56 | 56 | if (consommation == null) { |
57 | 57 | return generateError(HttpStatus.NOT_FOUND, "Consommation inconnue"); |
58 | 58 | } |
... | ... | @@ -64,8 +64,8 @@ public class ConsommationController extends BaseController implements etunicorn. |
64 | 64 | |
65 | 65 | @Override |
66 | 66 | @RestrictedTo("CONSO_GET") |
67 | - public ResponseEntity<?> getConsommationById(@PathVariable Long consommationId, @PathVariable String idConsommation) { | |
68 | - Consommation consommation = consommationRepository.findById(consommationId.intValue()); | |
67 | + public ResponseEntity<?> getConsommationById(@PathVariable Long idConsommation) { | |
68 | + Consommation consommation = consommationRepository.findById(idConsommation.intValue()); | |
69 | 69 | if (consommation == null) { |
70 | 70 | return generateError(HttpStatus.NOT_FOUND, "Consommation inconnue"); |
71 | 71 | } |
... | ... | @@ -74,8 +74,8 @@ public class ConsommationController extends BaseController implements etunicorn. |
74 | 74 | |
75 | 75 | @Override |
76 | 76 | @RestrictedTo("CONSO_REMOVE") |
77 | - public ResponseEntity<?> deleteConsommationById(@PathVariable Long consommationId, @PathVariable String idConsommation) { | |
78 | - Consommation consommation = consommationRepository.findById(consommationId.intValue()); | |
77 | + public ResponseEntity<?> deleteConsommationById(@PathVariable Long idConsommation) { | |
78 | + Consommation consommation = consommationRepository.findById(idConsommation.intValue()); | |
79 | 79 | if (consommation == null) { |
80 | 80 | return generateError(HttpStatus.NOT_FOUND, "Consommation inconnue"); |
81 | 81 | } |
... | ... | @@ -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, @PathVariable String idConsommation, @Valid @RequestBody UpdateAcheteRequest updateAcheteRequest) { | |
88 | + public ResponseEntity<?> updateAchete(@PathVariable Long idConsommation, @Valid @RequestBody UpdateAcheteRequest updateAcheteRequest) { | |
89 | 89 | return null; |
90 | 90 | } |
91 | 91 | } | ... | ... |