Browse Source

fix: 门户修改密码时修改gitlab密码

mjh 3 years ago
parent
commit
f831a1d986

+ 1 - 5
seecoder-portal-server/src/main/java/cn/seecoder/seecoderportalserver/service/UserService.java

@@ -140,11 +140,7 @@ public class UserService {
                 });
         user.setPassword(passwordEncoder.encode(password));
         User savedUser = userRepository.save(user);
-        try {
-            gitlabService.changePassword(Math.toIntExact(savedUser.getId()),password);
-        } catch (SeecoderGitlabException e) {
-            throw new CustomErrorException("gitlab密码重置失败,请联系管理人员!");
-        }
+        resetGitlabPassword(phone, phoneCode, password);
         log.debug("Reset Password for User: {}", savedUser);
     }