@@ -12,6 +12,7 @@ import { checkUserEmailForPurchase } from './appx-check-mail';
1212import { refreshDbInternal } from '@/actions/refresh-db' ;
1313
1414const LOCAL_CMS_PROVIDER = process . env . LOCAL_CMS_PROVIDER ;
15+ const COHORT_2_PARENT_COURSES = [ 1 , 2 , 3 ] ;
1516const COHORT_3_PARENT_COURSES = [ 8 , 9 , 10 , 11 , 12 ] ;
1617const 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