diff --git a/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/user/service/UserService.java b/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/user/service/UserService.java index b7dc9326c..52a1ba05c 100644 --- a/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/user/service/UserService.java +++ b/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/user/service/UserService.java @@ -43,6 +43,8 @@ public interface UserService { Mono addNewConnectionAndReturnUser(String userId, AuthUser authUser); + Mono saveUser(User user); + Mono deleteProfilePhoto(User visitor); Mono updatePassword(String userId, String oldPassword, String newPassword); diff --git a/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/user/service/UserServiceImpl.java b/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/user/service/UserServiceImpl.java index c1559b42d..6b800720c 100644 --- a/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/user/service/UserServiceImpl.java +++ b/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/user/service/UserServiceImpl.java @@ -225,6 +225,11 @@ public Mono addNewConnectionAndReturnUser(String userId, AuthUser authUser .flatMap(repository::save); } + @Override + public Mono saveUser(User user) { + return repository.save(user); + } + @Override public Mono deleteProfilePhoto(User visitor) { String userAvatar = visitor.getAvatar(); diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/service/AuthenticationApiServiceImpl.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/service/AuthenticationApiServiceImpl.java index 7ca9fe3f9..04002798c 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/service/AuthenticationApiServiceImpl.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/service/AuthenticationApiServiceImpl.java @@ -164,7 +164,7 @@ public Mono updateOrCreateUser(AuthUser authUser, boolean linkExistingUser if (findByAuthUserFirst.userExist()) { User user = findByAuthUserFirst.user(); updateConnection(authUser, user); - return userService.update(user.getId(), user); + return userService.saveUser(user); } //If the user connection is not found with login id, but the user is