Merged PR 85: Update logic application for retrieving docs
Update logic application for retrieving docs
This commit is contained in:
@@ -34,12 +34,8 @@ public class KSDocumentService {
|
||||
logger.info("findByProjectNameAndApplicationName function:");
|
||||
User principal = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
||||
|
||||
try {
|
||||
if( principal.getSelectedApplication()==null){
|
||||
return ksdocRepo.findByProjectName(principal.getSelectedProject().getInternal_name(), Sort.by(Sort.Direction.DESC, "ingestionDate"));
|
||||
}else{
|
||||
return ksdocRepo.findByProjectNameAndApplicationName(principal.getSelectedProject().getInternal_name(), principal.getSelectedApplication().getInternal_name(), Sort.by(Sort.Direction.DESC, "ingestionDate"));
|
||||
}
|
||||
try {
|
||||
return ksdocRepo.findByProjectName(principal.getSelectedProject().getInternal_name(), Sort.by(Sort.Direction.DESC, "ingestionDate"));
|
||||
} catch (Exception e) {
|
||||
logger.error("Error in findByProjectNameAndApplicationName function: " + e.getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user