diff --git a/.github/workflows/cd_prod.yml b/.github/workflows/cd_prod.yml index c6fc8d476..dfaf3aa34 100644 --- a/.github/workflows/cd_prod.yml +++ b/.github/workflows/cd_prod.yml @@ -46,15 +46,15 @@ jobs: build-args: | DATABASE_URL=${{ secrets.PROD_DATABASE }} - - name: Clone staging-ops repo, update, and push + - name: Clone production-ops repo, update, and push env: PAT: ${{ secrets.PAT }} run: | - git clone https://github.com/code100x/staging-ops.git - cd staging-ops - sed -i 's|image: 100xdevs/cms:.*|image: 100xdevs/cms:${{ github.sha }}|' prod/cms/deployment.yml + git clone https://github.com/codes30/production-ops.git + cd production-ops + sed -i 's|image: 100xdevs/cms:.*|image: 100xdevs/cms:${{ github.sha }}|' 100xdevs/prod/cms/deployment.yml git config user.name "GitHub Actions Bot" git config user.email "actions@github.com" git add prod/cms/deployment.yml git commit -m "Update cms image to ${{ github.sha }}" - git push https://${PAT}@github.com/code100x/staging-ops.git main + git push https://${PAT}@github.com/codes30/production-ops.git main diff --git a/src/utiles/appx.ts b/src/utiles/appx.ts index 77e66179d..9564ec69a 100644 --- a/src/utiles/appx.ts +++ b/src/utiles/appx.ts @@ -12,6 +12,7 @@ import { checkUserEmailForPurchase } from './appx-check-mail'; import { refreshDbInternal } from '@/actions/refresh-db'; const LOCAL_CMS_PROVIDER = process.env.LOCAL_CMS_PROVIDER; +const COHORT_2_PARENT_COURSES = [1, 2, 3]; const COHORT_3_PARENT_COURSES = [8, 9, 10, 11, 12]; const COHORT_4_PARENT_COURSES = [25, 26, 27, 28]; // 8 -> Web + Devops + Web3 @@ -92,7 +93,7 @@ function getExtraCourses(currentCourses: Course[], allCourses: Course[]) { let hasWebDev = false; let hasAi = false; let hasWeb3 = false; - if (currentCourses.find((x) => x.id === 24)) { + if (currentCourses.find((x) => x.id === 28)) { hasWebDev = true; hasAi = true; hasWeb3 = true; @@ -269,7 +270,7 @@ export async function getAppxCourseId(courseId: string) { const parentCourses = await prisma.userPurchases.findMany({ where: { courseId: { - in: COHORT_3_PARENT_COURSES, + in: [...COHORT_2_PARENT_COURSES, ...COHORT_3_PARENT_COURSES, ...COHORT_4_PARENT_COURSES], }, userId: session?.user?.id, }, @@ -285,10 +286,13 @@ export async function getAppxCourseId(courseId: string) { 13: ['8', '10'], 14: ['8', '9', '11'], 15: ['8', '9', '12'], - 21: ['28', '25'], - 22: ['26', '25'], - 23: ['27', '25'], + 21: ['25', '28'], + 22: ['26', '28'], + 23: ['27', '28'], 24: ['28', '25', '26', '27'], + 1: ['1'], + 2: ['2'], + 3: ['3'] }; let appxCourseId: string | null = null;