fix authService
Test Workflow / test (push) Successful in 4s

This commit is contained in:
vladp
2026-01-21 12:21:14 +07:00
parent 1fc065a46b
commit 251bb37105
11 changed files with 135 additions and 287 deletions
@@ -51,7 +51,7 @@ public class VerifyRegisterUserHandler implements RequestHandler {
User user = userRepository.findById(userId)
.orElseThrow(() -> new UserNotFoundException("User not found with id: " + userId));
Optional<AuthToken> userAuthTokens = authTokenRepository.findByUserIdAndIsActive(userId, false);
Optional<AuthToken> userAuthTokens = authTokenRepository.findByUserId(userId);
AuthToken authToken = userAuthTokens.isEmpty() ? authService.generateAuthToken(user): userAuthTokens.get();