Skip to content

Commit

Permalink
Run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
aurora-dot committed May 23, 2024
1 parent 3b43c81 commit 0a20f02
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
6 changes: 2 additions & 4 deletions src/app/api/scraper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { NextRequest } from "next/server";
import { NextRequest } from 'next/server';

export default async function handler(req: NextRequest) {

}
export default async function handler(req: NextRequest) {}
12 changes: 6 additions & 6 deletions src/app/lib/db.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { PrismaClient } from '@prisma/client'
import { PrismaClient } from '@prisma/client';

const prismaClientSingleton = () => {
return new PrismaClient()
}
return new PrismaClient();
};

declare const globalThis: {
prismaGlobal: ReturnType<typeof prismaClientSingleton>;
} & typeof global;

const prisma = globalThis.prismaGlobal ?? prismaClientSingleton()
const prisma = globalThis.prismaGlobal ?? prismaClientSingleton();

export default prisma
export default prisma;

if (process.env.NODE_ENV !== 'production') globalThis.prismaGlobal = prisma
if (process.env.NODE_ENV !== 'production') globalThis.prismaGlobal = prisma;

0 comments on commit 0a20f02

Please sign in to comment.