From 03431245f71385c5d641f66a7f63c1a22ab65210 Mon Sep 17 00:00:00 2001
From: sowgro <tpoke.ferrari@gmail.com>
Date: Fri, 4 Apr 2025 20:56:36 -0400
Subject: [backend] Add toString to need for debugging

---
 .../main/java/com/ufund/api/ufundapi/model/Need.java   | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

(limited to 'ufund-api/src/main/java')

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
-- 
cgit v1.2.3


From 04db6f32b249ffb17c571cd6b16c8c54397f0be4 Mon Sep 17 00:00:00 2001
From: sowgro <tpoke.ferrari@gmail.com>
Date: Fri, 4 Apr 2025 23:55:19 -0400
Subject: Fix typos

---
 .../main/java/com/ufund/api/ufundapi/controller/CupboardController.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'ufund-api/src/main/java')

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) {
-- 
cgit v1.2.3