added a method to find a user_info by id
This commit is contained in:
parent
3ec8ac93e9
commit
e235a72c08
@ -30,6 +30,9 @@ public class FinderUtil {
|
||||
@Autowired
|
||||
static UserRepository userRepository;
|
||||
|
||||
@Autowired
|
||||
static User_InfoRepository user_infoRepository;
|
||||
|
||||
public static ResponseEntity findCacheById(String cacheID) {
|
||||
|
||||
Optional<Cache> cacheOptional = cacheRepository.findById(Integer.valueOf(cacheID));
|
||||
@ -79,4 +82,13 @@ public class FinderUtil {
|
||||
return ResponseEntity.status(404).body("Couldnt find CacheAccesDefinition " + cacheAccesDefinitionID);
|
||||
}
|
||||
}
|
||||
|
||||
public static ResponseEntity findUser_InfoByID(String infoID) {
|
||||
Optional<User_Info> user_InfoOptional = user_infoRepository.findById(Integer.valueOf(infoID));
|
||||
if (user_InfoOptional.isPresent()) {
|
||||
return ResponseEntity.status(200).body(user_InfoOptional.get());
|
||||
} else {
|
||||
return ResponseEntity.status(404).body("Couldnt find User_Info " + infoID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user