Skip to content

mongodb concurrency issue fixed #1270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public interface UserService {

Mono<User> addNewConnectionAndReturnUser(String userId, AuthUser authUser);

Mono<User> saveUser(User user);

Mono<Void> deleteProfilePhoto(User visitor);

Mono<Boolean> updatePassword(String userId, String oldPassword, String newPassword);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ public Mono<User> addNewConnectionAndReturnUser(String userId, AuthUser authUser
.flatMap(repository::save);
}

@Override
public Mono<User> saveUser(User user) {
return repository.save(user);
}

@Override
public Mono<Void> deleteProfilePhoto(User visitor) {
String userAvatar = visitor.getAvatar();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public Mono<User> 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
Expand Down
Loading