security
This commit is contained in:
1 parent
2064ed5abc
commit
9efd7b3fb4
33 files changed
+595
-91
No files matched your search
@@ -22,4 +22,8 @@ public class UserService {
|
||||
public User getUserById(Long userId) {
|
||||
return userRepo.findById(userId).orElseThrow(() -> new UsernameNotFoundException("User not found"));
|
||||
}
|
||||
|
||||
public User getUserByUsername(String username) {
|
||||
return userRepo.findUserByUsername(username).orElseThrow(() -> new UsernameNotFoundException("User not found"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user