Skip to content

Commit

Permalink
add missing prisma imports
Browse files Browse the repository at this point in the history
  • Loading branch information
DexterStorey committed Jan 29, 2024
1 parent af5c5c6 commit 3e55536
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/[slug]/(base)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {redirect} from 'next/navigation'
import {Suspense} from 'react'
import Projects from '~/components/dashboard/Projects/ProjectsList'
import {getCurrentUser} from '~/utils/session'
import prisma from '~/prisma'

export default async function Dashboard({params}: {params: {slug: string}}) {
const user = await getCurrentUser()
Expand Down
1 change: 1 addition & 0 deletions app/[slug]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import DashboardHeader from '~/components/dashboard/Navigation/DashboardHeader'
import prisma from '~/prisma'
import {getCurrentUser} from '~/utils/session'

async function Teams() {
Expand Down
2 changes: 2 additions & 0 deletions app/[slug]/project/[projectId]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import prisma from '~/prisma'

export default async function Page({params}: {params: {projectId: string}}) {
const project = await prisma.project.findUnique({
where: {id: params.projectId}
Expand Down
1 change: 1 addition & 0 deletions lib/actions/add-project.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use server'
import {z} from 'zod'
import {getCurrentUser} from '~/utils/session'
import prisma from '~/prisma'

const schema = z.object({
teamId: z.string()
Expand Down
1 change: 1 addition & 0 deletions lib/actions/create-instruction.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use server'
import {revalidatePath} from 'next/cache'
import {redirect} from 'next/navigation'
import prisma from '~/prisma'
import {getCurrentUser} from '~/utils/session'

export default async function createInstruction(
Expand Down
1 change: 1 addition & 0 deletions lib/actions/create-team.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import {z} from 'zod'
import {slugify} from '~/utils'
import {getCurrentUser} from '~/utils/session'
import prisma from '~/prisma'

const schema = z.object({
name: z.string()
Expand Down
1 change: 1 addition & 0 deletions lib/actions/delete-instruction.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use server'
import {revalidatePath} from 'next/cache'
import {redirect} from 'next/navigation'
import prisma from '~/prisma'

export default async function deleteInstruction(
teamSlug: string,
Expand Down
1 change: 1 addition & 0 deletions lib/actions/delete-team.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use server'
import {z} from 'zod'
import prisma from '~/prisma'
import {getCurrentUser} from '~/utils/session'

const schema = z.object({
Expand Down
1 change: 1 addition & 0 deletions lib/actions/submit-feedback.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use server'
import {z} from 'zod'
import prisma from '~/prisma'
import {getCurrentUser} from '~/utils/session'

const schema = z.object({
Expand Down
1 change: 1 addition & 0 deletions lib/agents/reviewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {codeComment} from '~/tools/codeComment'
import {codebaseSearch} from '~/tools/codeSearch'
import {prComment} from '~/tools/prComment'
import {isDev} from '~/utils/index'
import prisma from '~/prisma'

export async function reviewer({
customerId,
Expand Down
4 changes: 0 additions & 4 deletions lib/prisma.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import {PrismaClient} from '@prisma/client'
import env from './env.mjs'

declare global {
var prisma: PrismaClient | undefined
}

const prisma = global.prisma || new PrismaClient()

if (env.NODE_ENV === 'development') global.prisma = prisma
Expand Down
1 change: 1 addition & 0 deletions lib/utils/github.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import jwt from 'jsonwebtoken'
import Stripe from 'stripe'
import {GITHUB} from '~/constants'
import prisma from '~/prisma'
import {Label, Repository} from '~/types'
import {createPaymentLink} from '~/utils/payment'
import Weaviate from './embeddings/db'
Expand Down

1 comment on commit 3e55536

@vercel
Copy link

@vercel vercel bot commented on 3e55536 Jan 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.