diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2025-03-26 18:14:47 -0400 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2025-03-26 18:14:47 -0400 |
commit | ab35efb06b926e8a3aee5cfc8d1fa908aa4a4707 (patch) | |
tree | 6f456fe322a32510c611cd787d653ed186b0777d /ufund-api/src/main/java/com/ufund/api/ufundapi/service/CupboardService.java | |
parent | ea13cf6ab3b71ff5e83fca876ec71fec1f7b00ae (diff) | |
download | JellySolutions-ab35efb06b926e8a3aee5cfc8d1fa908aa4a4707.tar.gz JellySolutions-ab35efb06b926e8a3aee5cfc8d1fa908aa4a4707.tar.bz2 JellySolutions-ab35efb06b926e8a3aee5cfc8d1fa908aa4a4707.zip |
Fix cupboard access checking and logging
Diffstat (limited to 'ufund-api/src/main/java/com/ufund/api/ufundapi/service/CupboardService.java')
-rw-r--r-- | ufund-api/src/main/java/com/ufund/api/ufundapi/service/CupboardService.java | 3 |
1 files changed, 2 insertions, 1 deletions
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 91e3ba5..aaa8cb8 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 @@ -111,7 +111,7 @@ public class CupboardService { if (checkoutAmount <= 0) { throw new IllegalArgumentException("Amount must be greater than 0"); } - authService.authenticate(key); + authService.keyIsValid(key); Need need = cupboardDAO.getNeed(id); need.incrementCurrent(checkoutAmount); } @@ -124,6 +124,7 @@ public class CupboardService { * @throws IOException Thrown on any problem removing the need */ public boolean deleteNeed(int id) throws IOException { + return cupboardDAO.deleteNeed(id); } } |