Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/cbrelease-4.8.10' into cbrelease…
Browse files Browse the repository at this point in the history
…-4.8.11
  • Loading branch information
karthik-tarento committed Mar 6, 2024
2 parents 8f50724 + af4c32d commit e7783f2
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ public SBApiResponse getExploreCourseList() {
errMsg = "Failed to get contant details for Identifier List from DB.";
} else {
Map<String, Object> responseCourseList = (Map<String, Object>) searchResponse.get(Constants.RESULT);
List<Map<String, Object>> contentList = (List<Map<String, Object>>) responseCourseList.get(Constants.CONTENT);
if (CollectionUtils.isNotEmpty(contentList)) {
List<Map<String, Object>> sortedContentList = identifierList.stream().map(identifier -> contentList.stream()
.filter(content -> identifier.equals(content.get(Constants.IDENTIFIER)))
.findFirst().orElse(null)).filter(Objects::nonNull).collect(Collectors.toList());
responseCourseList.put(Constants.CONTENT, sortedContentList);
}
response.setResult(responseCourseList);
}
} catch (Exception e) {
Expand Down

0 comments on commit e7783f2

Please sign in to comment.