File tree Expand file tree Collapse file tree 4 files changed +4
-11
lines changed Expand file tree Collapse file tree 4 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 1
1
import { NextRequest , NextResponse } from 'next/server'
2
- import { PrismaClient } from '@prisma/client'
3
-
4
- const prisma = new PrismaClient ( )
2
+ import prisma from '@/lib/db'
5
3
6
4
export async function POST ( req : NextRequest ) {
7
5
try {
Original file line number Diff line number Diff line change 1
1
import { NextResponse } from 'next/server'
2
- import { PrismaClient } from '@prisma/client'
3
2
import webpush , { WebPushError } from 'web-push'
4
3
import { messaging } from 'firebase-admin'
5
4
import { sendNotification , SubscriptionRecord } from '../../../../lib/notifications'
6
5
7
- const prisma = new PrismaClient ( )
6
+ import prisma from '@/lib/db'
8
7
9
8
export async function POST ( request : Request ) {
10
9
try {
Original file line number Diff line number Diff line change 1
1
import { NextRequest , NextResponse } from 'next/server'
2
- import { PrismaClient } from '@prisma/client'
3
-
4
- const prisma = new PrismaClient ( )
2
+ import prisma from '@/lib/db'
5
3
6
4
export async function POST ( req : NextRequest ) {
7
5
try {
Original file line number Diff line number Diff line change 1
1
import React from 'react'
2
- import { PrismaClient } from '@prisma/client'
3
2
import PostsTable from '@/components/jobs/PostsTable'
4
3
import VideoPlayer from '../../components/video-player'
5
-
6
- const prisma = new PrismaClient ( )
4
+ import prisma from '@/lib/db'
7
5
8
6
export default async function Home ( props : { searchParams : Promise < { page ?: string } > } ) {
9
7
const searchParams = await props . searchParams
You can’t perform that action at this time.
0 commit comments