优化用户登录逻辑
This commit is contained in:
@@ -31,7 +31,7 @@ public class UserService implements UserDetailsService {
|
||||
}
|
||||
|
||||
public User getUserByPhone(String phone) {
|
||||
return userRepository.findUserByPhone(phone).orElseThrow(() -> new RuntimeException("User not found with phone: " + phone));
|
||||
return userRepository.findUserByPhone(phone).orElse(null);
|
||||
}
|
||||
|
||||
public User registerUser(String userId, String password) {
|
||||
|
||||
Reference in New Issue
Block a user