Skip to content

Commit 7d79808

Browse files
committed
Updaed prisma client import to use lib/db.ts.
1 parent 99a1fa4 commit 7d79808

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

src/app/api/location/route.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { NextRequest, NextResponse } from 'next/server'
2-
import { PrismaClient } from '@prisma/client'
3-
4-
const prisma = new PrismaClient()
2+
import prisma from '@/lib/db'
53

64
export async function POST(req: NextRequest) {
75
try {

src/app/api/notifications/mass-notification/route.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { NextResponse } from 'next/server'
2-
import { PrismaClient } from '@prisma/client'
32
import webpush, { WebPushError } from 'web-push'
43
import { messaging } from 'firebase-admin'
54
import { sendNotification, SubscriptionRecord } from '../../../../lib/notifications'
65

7-
const prisma = new PrismaClient()
6+
import prisma from '@/lib/db'
87

98
export async function POST(request: Request) {
109
try {

src/app/api/notifications/subscribe/route.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { NextRequest, NextResponse } from 'next/server'
2-
import { PrismaClient } from '@prisma/client'
3-
4-
const prisma = new PrismaClient()
2+
import prisma from '@/lib/db'
53

64
export async function POST(req: NextRequest) {
75
try {

src/app/jobs/page.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import React from 'react'
2-
import { PrismaClient } from '@prisma/client'
32
import PostsTable from '@/components/jobs/PostsTable'
43
import VideoPlayer from '../../components/video-player'
5-
6-
const prisma = new PrismaClient()
4+
import prisma from '@/lib/db'
75

86
export default async function Home(props: { searchParams: Promise<{ page?: string }> }) {
97
const searchParams = await props.searchParams

0 commit comments

Comments
 (0)