|
|
|
@ -85,6 +85,7 @@ public class UserService {
|
|
|
|
.orElseThrow(() -> new EntityNotFoundException("User not found with ID: " + request.getUserId()));
|
|
|
|
.orElseThrow(() -> new EntityNotFoundException("User not found with ID: " + request.getUserId()));
|
|
|
|
|
|
|
|
|
|
|
|
user.setPassword(passwordEncryptionService.hashPassword(request.getNewPassword()));
|
|
|
|
user.setPassword(passwordEncryptionService.hashPassword(request.getNewPassword()));
|
|
|
|
|
|
|
|
user.setFirstLogin(false);
|
|
|
|
userRepository.save(user);
|
|
|
|
userRepository.save(user);
|
|
|
|
return "Password changed successfully";
|
|
|
|
return "Password changed successfully";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|