diff --git a/src/main/java/org/sunbird/trending/controller/TrendingServiceImpl.java b/src/main/java/org/sunbird/trending/controller/TrendingServiceImpl.java index 9d732c302..cf1208be9 100644 --- a/src/main/java/org/sunbird/trending/controller/TrendingServiceImpl.java +++ b/src/main/java/org/sunbird/trending/controller/TrendingServiceImpl.java @@ -34,7 +34,7 @@ public Map trendingSearch(Map requestBody, Strin SBApiResponse response = ProjectUtil.createDefaultResponse(API_TRENDING_SEARCH); HashMap request = (HashMap) requestBody.get(Constants.REQUEST) ==null ? new HashMap<>() : (HashMap) requestBody.get(Constants.REQUEST); HashMap filter = ((HashMap) request.get(Constants.FILTERS)) ==null ? new HashMap<>() : ((HashMap) request.get(Constants.FILTERS)); - ArrayList primaryCategoryList = ((ArrayList) (filter).get(Constants.CONTEXT_TYPE)) == null ? new ArrayList<>() : ((ArrayList) (filter).get(Constants.PRIMARY_CATEGORY)); + ArrayList primaryCategoryList = ((ArrayList) (filter).get(Constants.CONTEXT_TYPE)) == null ? new ArrayList<>() : ((ArrayList) (filter).get(CONTEXT_TYPE)); String org = ((String) (filter).get(Constants.ORGANISATION)) == null ? "" : ((String) (filter).get(Constants.ORGANISATION)) ; int limit = Optional.ofNullable(request.get(Constants.LIMIT)).map(l -> (Integer) l).orElse(0);