Skip to content

Commit 169243b

Browse files
authored
Merge pull request #2195 from tekdi/release-1.12.0-prod-fix
Release 1.12.0 prod fix to learner prod
2 parents 3ceb98b + 9da0c4c commit 169243b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

mfes/content/src/components/Content/List.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,12 @@ export default function Content(props: Readonly<ContentProps>) {
341341
// filter.primaryCategory = [
342342
// 'Learning Resource','Practice Question Set','Activity','Story'];
343343
console.log("filter====>" , filter);
344-
345344
const resultResponse2 = await ContentSearch({
346345
...filter,
347346
offset: adjustedOffset,
348347
limit: adjustedLimit,
349348
signal: controller.signal,
349+
thematicCount: true,
350350
primaryCategory: [
351351
'Learning Resource','Practice Question Set','Activity','Story' ,'Interactive'],
352352
});

mfes/content/src/services/Search.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export const ContentSearch = async ({
125125
limit = 5,
126126
offset = 0,
127127
noPrimaryCategory = false,
128+
thematicCount = false,
128129
primaryCategory,
129130
}: {
130131
type: string;
@@ -134,8 +135,10 @@ export const ContentSearch = async ({
134135
offset?: number;
135136
noPrimaryCategory?: boolean;
136137
primaryCategory?: string[];
138+
thematicCount?:boolean;
137139
}): Promise<ContentResponse> => {
138140
try {
141+
console.log('filters====>' , filters);
139142
// Ensure the environment variable is defined
140143
const searchApiUrl = process.env.NEXT_PUBLIC_MIDDLEWARE_URL;
141144
if (!searchApiUrl) {
@@ -152,7 +155,7 @@ export const ContentSearch = async ({
152155
status: ['live'],
153156
channel: localStorage.getItem('channelId'),
154157
};
155-
if(primaryCategory){
158+
if(primaryCategory && thematicCount){
156159
filtersObject.primaryCategory = primaryCategory;
157160
}
158161
console.log('filtersObject====>' , filters);

0 commit comments

Comments
 (0)