This commit is contained in:
Viktoria committed 2022-08-31 11:37:17 +02:00
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"));
}
}