diff options
| author | sowgro <tpoke.ferrari@gmail.com> | 2025-03-26 19:00:04 -0400 | 
|---|---|---|
| committer | sowgro <tpoke.ferrari@gmail.com> | 2025-03-26 19:00:04 -0400 | 
| commit | 5dfb1327c4507ae1613debb5b485fd74edff33db (patch) | |
| tree | 2c2c8e699bd62686120e4be84a25c20c37004551 /ufund-api/src/main/java | |
| parent | ab35efb06b926e8a3aee5cfc8d1fa908aa4a4707 (diff) | |
| download | JellySolutions-5dfb1327c4507ae1613debb5b485fd74edff33db.tar.gz JellySolutions-5dfb1327c4507ae1613debb5b485fd74edff33db.tar.bz2 JellySolutions-5dfb1327c4507ae1613debb5b485fd74edff33db.zip  | |
fix expiration logic and cleanup
Diffstat (limited to 'ufund-api/src/main/java')
3 files changed, 4 insertions, 3 deletions
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 786b104..22e86e3 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 @@ -38,7 +38,7 @@ public class Need {       * @param maxGoal The maximum goal for this need       * @param type    The type of need (monetary, physical)       */ -    public Need(String name, GoalType type, double maxGoal) { // TODO why is this needed +    public Need(String name, GoalType type, double maxGoal) {          this.name = name;          this.type = type;          this.maxGoal = maxGoal; diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/UserAuthFIleDAO.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/UserAuthFIleDAO.java index 9023b42..7bda3f9 100644 --- a/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/UserAuthFIleDAO.java +++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/UserAuthFIleDAO.java @@ -37,7 +37,7 @@ public class UserAuthFIleDAO implements UserAuthDAO {          UserAuth[] userAuthKeysArray = objectMapper.readValue(new File(filename), UserAuth[].class);          for (UserAuth userAuth : userAuthKeysArray) { -            if (userAuth.getExpiration().compareTo(LocalDateTime.now()) > -1) { // Someone else double check the logic is correct. Checks if auth is valid and adds if so +            if (userAuth.getExpiration().isBefore(LocalDateTime.now())) {                  userAuthMap.put(userAuth.getKey(), userAuth);              }          } diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/UserFileDAO.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/UserFileDAO.java index 0d9b9e4..4b09449 100644 --- a/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/UserFileDAO.java +++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/UserFileDAO.java @@ -81,7 +81,8 @@ public class UserFileDAO implements UserDAO {      public User updateUser(User user) throws IOException {          synchronized (users) {              if (users.containsKey(user.getUsername())) { -                if (user.getBasket() == null || user.getType() == null) { // TODO clean this up +                if (user.getBasket() == null || user.getType() == null) { +                    System.err.println("CRUTCH HAPPENED");                      User oldData = users.get(user.getUsername());                      User crutch = new User(oldData.getUsername(), 0, new ArrayList<>(), oldData.getType());                      crutch.copyPassword(oldData);  | 
