diff options
author | benal01 <bja4245@rit.edu> | 2025-03-22 11:21:30 -0400 |
---|---|---|
committer | benal01 <bja4245@rit.edu> | 2025-03-22 11:21:30 -0400 |
commit | 2b67bd14828c8c0bffe461a66542a2dba6c19f93 (patch) | |
tree | 0286c7e95d261680247ee36324363252b0ab638b | |
parent | 5eef7755f799d0f4fffad88dd05f18459c206253 (diff) | |
download | JellySolutions-2b67bd14828c8c0bffe461a66542a2dba6c19f93.tar.gz JellySolutions-2b67bd14828c8c0bffe461a66542a2dba6c19f93.tar.bz2 JellySolutions-2b67bd14828c8c0bffe461a66542a2dba6c19f93.zip |
API creation bug fix- the max goal would not be casted properly
3 files changed, 8 insertions, 5 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 36ae341..55cf88d 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 @@ -50,7 +50,8 @@ public class CupboardController { public ResponseEntity<Need> createNeed(@RequestBody Map<String, Object> params) { System.out.println(params); String name = (String) params.get("name"); - double maxGoal = (double) params.get("maxGoal"); + System.out.println("attemtping cast maxgoual"); + double maxGoal = ((Number) params.get("maxGoal")).doubleValue(); Need.GoalType goalType = GoalType.valueOf((String) params.get("type")); try { diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.css b/ufund-ui/src/app/components/cupboard/cupboard.component.css index 4c6ac4b..434b136 100644 --- a/ufund-ui/src/app/components/cupboard/cupboard.component.css +++ b/ufund-ui/src/app/components/cupboard/cupboard.component.css @@ -1,17 +1,21 @@ :host { display: flex; - justify-content: left; + justify-content: space-evenly; border: 2px solid #000; border-radius: 5px; padding: 10px 20px; + > div { + width: 40%; + } } + + #menu { display: flex; justify-content: space-between; margin: 10px; * { border: 3px solid #000; - border-top-left-radius: 5px; border-top-right-radius: 5px; margin-right: 5px; @@ -29,5 +33,4 @@ #create-button { padding: 10px 20px; - }
\ No newline at end of file diff --git a/ufund-ui/src/app/components/need-list/need-list.component.css b/ufund-ui/src/app/components/need-list/need-list.component.css index f8948ee..bf7b982 100644 --- a/ufund-ui/src/app/components/need-list/need-list.component.css +++ b/ufund-ui/src/app/components/need-list/need-list.component.css @@ -4,7 +4,6 @@ display: block; border-radius: 5px; } - li, div { border: 2px solid #000; border-radius: 5px; |