diff options
author | benal01 <bja4245@rit.edu> | 2025-02-16 14:41:34 -0500 |
---|---|---|
committer | benal01 <bja4245@rit.edu> | 2025-02-16 14:41:34 -0500 |
commit | 2f4119f80731b62fce2eeff5f1c1dc77ae53c180 (patch) | |
tree | f52c4ea45ea43a9b452c3ab6468452762a3bfa23 | |
parent | 6c32da25ccbcd0568f7b34cd81565609625435ef (diff) | |
download | JellySolutions-2f4119f80731b62fce2eeff5f1c1dc77ae53c180.tar.gz JellySolutions-2f4119f80731b62fce2eeff5f1c1dc77ae53c180.tar.bz2 JellySolutions-2f4119f80731b62fce2eeff5f1c1dc77ae53c180.zip |
javadoc
-rw-r--r-- | ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java index 0de3403..8d394c1 100644 --- a/ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java +++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java @@ -40,6 +40,14 @@ public class CupboardController { return cupboard.getNeed(id); } + + /** + * Updates a Need with the provided one + * + * @param need The need to update + * @return OK response and the need if it was successful, or INTERNAL_SERVER_ERROR if there was an issue + */ + @PutMapping("") public ResponseEntity<Need> updateNeed(@RequestBody Need need) { try { @@ -48,7 +56,6 @@ public class CupboardController { } catch (IOException e) { return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); } - } @DeleteMapping("/{id}") |