aboutsummaryrefslogtreecommitdiff
path: root/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence
diff options
context:
space:
mode:
authorGunther6070 <haydenhartman10@yahoo.com>2025-02-26 16:00:35 -0500
committerGunther6070 <haydenhartman10@yahoo.com>2025-02-26 16:00:35 -0500
commit72d614074a3cd578322931af647c6f0a65a23dfd (patch)
tree438a2ebaae76a4373235c369df576d4618315c38 /ufund-api/src/main/java/com/ufund/api/ufundapi/persistence
parent03799f252ad2fb207e256fe7eff7ad0600131b7d (diff)
downloadJellySolutions-72d614074a3cd578322931af647c6f0a65a23dfd.tar.gz
JellySolutions-72d614074a3cd578322931af647c6f0a65a23dfd.tar.bz2
JellySolutions-72d614074a3cd578322931af647c6f0a65a23dfd.zip
Tested user http calls and fixed update user
Diffstat (limited to 'ufund-api/src/main/java/com/ufund/api/ufundapi/persistence')
-rw-r--r--ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/UserFileDAO.java4
1 files changed, 2 insertions, 2 deletions
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 0f30824..18eec18 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
@@ -95,7 +95,7 @@ public class UserFileDAO implements UserDAO {
@Override
public User createUser(User user) throws IOException {
synchronized (users) {
- if (getUser(user.getName()) != null) {
+ if (getUser(user.getName()) == null) {
User newUser = new User(user);
users.put(newUser.getName(), newUser);
save();
@@ -131,7 +131,7 @@ public class UserFileDAO implements UserDAO {
/**
* Delete a user matching the name
*
- * @param name The name of the user
+ * @param name The name of the user
*
* @return True if deleted, false otherwise
* @throws IOException If there was an IO issue saving the file