aboutsummaryrefslogtreecommitdiff
path: root/ufund-api/src/main
diff options
context:
space:
mode:
authorGunther6070 <haydenhartman10@yahoo.com>2025-04-05 13:44:33 -0400
committerGunther6070 <haydenhartman10@yahoo.com>2025-04-05 13:44:33 -0400
commitef52495d781a3adcec79bfbc9067f70f5ec3c8ab (patch)
treee16e8cf36f1cafcf198d21d57a0b3a908116b3df /ufund-api/src/main
parentd7c974a98de42f41f3ca16f961d2dee96a3c4313 (diff)
parent0103ffc6f84d04433943c644ab759c1d04b5e681 (diff)
downloadJellySolutions-ef52495d781a3adcec79bfbc9067f70f5ec3c8ab.tar.gz
JellySolutions-ef52495d781a3adcec79bfbc9067f70f5ec3c8ab.tar.bz2
JellySolutions-ef52495d781a3adcec79bfbc9067f70f5ec3c8ab.zip
Merge branch 'main' into checkout-improvement
# Conflicts: # ufund-ui/src/app/components/funding-basket/funding-basket.component.html # ufund-ui/src/app/components/funding-basket/funding-basket.component.ts
Diffstat (limited to 'ufund-api/src/main')
-rw-r--r--ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java2
-rw-r--r--ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java18
2 files changed, 19 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 075878a..5452c81 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
@@ -198,7 +198,7 @@ public class CupboardController {
for (Map<String, Integer> map : data) {
int needID = map.get("needID");
if (cupboardService.getNeed(needID) == null) {
- return new ResponseEntity<>("One or more need is invalid, please refresh.", HttpStatus.BAD_REQUEST);
+ return new ResponseEntity<>("One or more needs are invalid, please refresh.", HttpStatus.BAD_REQUEST);
}
}
for (Map<String, Integer> map : data) {
diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java
index 9b6170b..d3b3065 100644
--- a/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java
+++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java
@@ -2,6 +2,8 @@ package com.ufund.api.ufundapi.model;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Arrays;
+
public class Need {
public enum GoalType {
@@ -129,4 +131,20 @@ public class Need {
public void setID(int id){
this.id = id;
}
+
+ @Override
+ public String toString() {
+ return "Need{" +
+ "name='" + name + '\'' +
+ ", image='" + image + '\'' +
+ ", location='" + location + '\'' +
+ ", id=" + id +
+ ", filterAttributes=" + Arrays.toString(filterAttributes) +
+ ", type=" + type +
+ ", maxGoal=" + maxGoal +
+ ", urgent=" + urgent +
+ ", current=" + current +
+ ", description='" + description + '\'' +
+ '}';
+ }
} \ No newline at end of file