Skip to content

Commit 77d6c46

Browse files
committed
fixed appx.ts
1 parent 64aa988 commit 77d6c46

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/utiles/appx.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { checkUserEmailForPurchase } from './appx-check-mail';
1212
import { refreshDbInternal } from '@/actions/refresh-db';
1313

1414
const LOCAL_CMS_PROVIDER = process.env.LOCAL_CMS_PROVIDER;
15+
const COHORT_2_PARENT_COURSES = [1, 2, 3];
1516
const COHORT_3_PARENT_COURSES = [8, 9, 10, 11, 12];
1617
const COHORT_4_PARENT_COURSES = [25, 26, 27, 28];
1718
// 8 -> Web + Devops + Web3
@@ -269,7 +270,7 @@ export async function getAppxCourseId(courseId: string) {
269270
const parentCourses = await prisma.userPurchases.findMany({
270271
where: {
271272
courseId: {
272-
in: [...COHORT_3_PARENT_COURSES, ...COHORT_4_PARENT_COURSES],
273+
in: [...COHORT_2_PARENT_COURSES, ...COHORT_3_PARENT_COURSES, ...COHORT_4_PARENT_COURSES],
273274
},
274275
userId: session?.user?.id,
275276
},
@@ -289,6 +290,9 @@ export async function getAppxCourseId(courseId: string) {
289290
22: ['26', '28'],
290291
23: ['27', '28'],
291292
24: ['28', '25', '26', '27'],
293+
1: ['1'],
294+
2: ['2'],
295+
3: ['3']
292296
};
293297

294298
let appxCourseId: string | null = null;

0 commit comments

Comments
 (0)