From 227360990424abe323c44664b1d58d667b89a92f Mon Sep 17 00:00:00 2001 From: benal01 Date: Mon, 31 Mar 2025 10:10:41 -0400 Subject: backend support for description --- .../main/java/com/ufund/api/ufundapi/service/CupboardService.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ufund-api/src/main/java/com/ufund/api/ufundapi/service/CupboardService.java') diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/service/CupboardService.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/service/CupboardService.java index 4dcfcad..d216b01 100644 --- a/ufund-api/src/main/java/com/ufund/api/ufundapi/service/CupboardService.java +++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/service/CupboardService.java @@ -25,13 +25,16 @@ public class CupboardService { * Creates a new Need * * @param name The name of the need to create + * @param location The location of the new need * @param maxGoal The max goal of the new need * @param goalType The goal type of the new need + * @param urgent The urgency of the new need + * @param description The description of the new need * @return The need that was created * @throws IOException Thrown if there was any issue saving the data * @throws DuplicateKeyException If there already exists a need with the same name */ - public Need createNeed(String name, String location, double maxGoal, Need.GoalType goalType, boolean urgent) throws IOException, DuplicateKeyException { + public Need createNeed(String name, String location, double maxGoal, Need.GoalType goalType, boolean urgent, String description) throws IOException, DuplicateKeyException { if (maxGoal <= 0) { throw new IllegalArgumentException("Max Goal must be greater than zero"); @@ -43,7 +46,7 @@ public class CupboardService { } } - Need need = new Need(name, location, maxGoal, goalType, urgent); + Need need = new Need(name, location, maxGoal, goalType, urgent, description); return cupboardDAO.addNeed(need); } -- cgit v1.2.3 From 371caf37fb71fd9adf89e52a5557a9359d680539 Mon Sep 17 00:00:00 2001 From: benal01 Date: Mon, 31 Mar 2025 17:47:09 -0400 Subject: backend image support --- .../main/java/com/ufund/api/ufundapi/service/CupboardService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ufund-api/src/main/java/com/ufund/api/ufundapi/service/CupboardService.java') diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/service/CupboardService.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/service/CupboardService.java index d216b01..0652696 100644 --- a/ufund-api/src/main/java/com/ufund/api/ufundapi/service/CupboardService.java +++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/service/CupboardService.java @@ -25,6 +25,7 @@ public class CupboardService { * Creates a new Need * * @param name The name of the need to create + * @param image The image representation of the need to create * @param location The location of the new need * @param maxGoal The max goal of the new need * @param goalType The goal type of the new need @@ -34,7 +35,7 @@ public class CupboardService { * @throws IOException Thrown if there was any issue saving the data * @throws DuplicateKeyException If there already exists a need with the same name */ - public Need createNeed(String name, String location, double maxGoal, Need.GoalType goalType, boolean urgent, String description) throws IOException, DuplicateKeyException { + public Need createNeed(String name, String image, String location, double maxGoal, Need.GoalType goalType, boolean urgent, String description) throws IOException, DuplicateKeyException { if (maxGoal <= 0) { throw new IllegalArgumentException("Max Goal must be greater than zero"); @@ -46,7 +47,7 @@ public class CupboardService { } } - Need need = new Need(name, location, maxGoal, goalType, urgent, description); + Need need = new Need(name, image, location, maxGoal, goalType, urgent, description); return cupboardDAO.addNeed(need); } -- cgit v1.2.3