aboutsummaryrefslogtreecommitdiff
path: root/ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java
diff options
context:
space:
mode:
Diffstat (limited to 'ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java')
-rw-r--r--ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java4
1 files changed, 2 insertions, 2 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 dfcb8a3..15a741a 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
@@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.ufund.api.ufundapi.model.Need;
import com.ufund.api.ufundapi.model.Need.GoalType;
import com.ufund.api.ufundapi.service.CupboardService;
-import com.ufund.api.ufundapi.service.CupboardService.DuplicateKeyException;
+import com.ufund.api.ufundapi.DuplicateKeyException;
@RestController
@RequestMapping("cupboard")
@@ -50,7 +50,7 @@ public class CupboardController {
public ResponseEntity<Need> createNeed(@RequestBody Map<String, String> params) {
String name = params.get("name");
int maxGoal = Integer.parseInt(params.get("maxGoal"));
- Need.GoalType goalType = GoalType.valueOf(params.get("maxGoal"));
+ Need.GoalType goalType = GoalType.valueOf(params.get("goalType"));
try {
Need need = cupboardService.createNeed(name, maxGoal, goalType);