Compare commits

...

1 Commits

Author SHA1 Message Date
Anthony Stirling
6b06ea5f6c Update UserService.java 2025-02-21 10:18:04 +00:00

View File

@@ -139,6 +139,9 @@ public class UserService implements UserServiceInterface {
User user =
findByUsernameIgnoreCase(username)
.orElseThrow(() -> new UsernameNotFoundException("User not found"));
if(user.getApiKey() == null || user.getApiKey().length() == 0) {
user = addApiKeyToUser(username);
}
return user.getApiKey();
}