aboutsummaryrefslogtreecommitdiff
path: root/ufund-api
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2025-02-16 20:34:06 -0500
committersowgro <tpoke.ferrari@gmail.com>2025-02-16 20:34:06 -0500
commit967943ff9a697f34f21dde5eff3050e5776eec6e (patch)
tree86bcd05026a96ea1ef618accfad5eb5f9ed2600e /ufund-api
parente2e76f7e335e346820ba02e5aed95366593a10b7 (diff)
downloadJellySolutions-967943ff9a697f34f21dde5eff3050e5776eec6e.tar.gz
JellySolutions-967943ff9a697f34f21dde5eff3050e5776eec6e.tar.bz2
JellySolutions-967943ff9a697f34f21dde5eff3050e5776eec6e.zip
Make search case-insensitive
Diffstat (limited to 'ufund-api')
-rw-r--r--ufund-api/data/cupboard.json2
-rw-r--r--ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/CupboardFileDao.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/ufund-api/data/cupboard.json b/ufund-api/data/cupboard.json
index 0637a08..4be246d 100644
--- a/ufund-api/data/cupboard.json
+++ b/ufund-api/data/cupboard.json
@@ -1 +1 @@
-[] \ No newline at end of file
+[{"name":"Test","id":1,"maxGoal":100.0,"type":"PHYSICAL","filterAttributes":null,"Current":0.0}] \ No newline at end of file
diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/CupboardFileDao.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/CupboardFileDao.java
index 0f6e3af..81ee7c0 100644
--- a/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/CupboardFileDao.java
+++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/CupboardFileDao.java
@@ -27,7 +27,7 @@ public class CupboardFileDao implements CupboardDAO {
private synchronized static int nextId() {
int id = nextId;
- ++nextId;
+ nextId++;
return id;
}
@@ -68,7 +68,7 @@ public class CupboardFileDao implements CupboardDAO {
*/
private Need[] getNeedsArray(String search) {
return needs.values().stream()
- .filter(i -> i.getName().contains(search))
+ .filter(i -> i.getName().toLowerCase().contains(search.toLowerCase()))
.toArray(Need[]::new);
}