aboutsummaryrefslogtreecommitdiff
path: root/ufund-api/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'ufund-api/src/main/java')
-rw-r--r--ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java9
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}")