mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-04-13 11:09:26 -04:00
Fixes and add prisma accelerate
This commit is contained in:
@@ -73,6 +73,8 @@ export default function Post() {
|
||||
src={image}
|
||||
alt={profile.name || 'Profile picture'}
|
||||
className="h-full w-full object-cover"
|
||||
width={200}
|
||||
height={200}
|
||||
// onError={(e) => {
|
||||
// const target = e.target as HTMLImageElement;
|
||||
// target.onerror = null;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { PrismaClient } from "@prisma/client";
|
||||
import { withAccelerate } from '@prisma/extension-accelerate'
|
||||
|
||||
const globalForPrisma = global as unknown as { prisma: PrismaClient };
|
||||
|
||||
@@ -6,6 +7,6 @@ export const prisma =
|
||||
globalForPrisma.prisma ||
|
||||
new PrismaClient({
|
||||
log: ["query"],
|
||||
});
|
||||
}).$extends(withAccelerate());
|
||||
|
||||
if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;
|
||||
|
||||
924
package-lock.json
generated
924
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -4,10 +4,10 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev --turbopack",
|
||||
"postinstall": "npx prisma generate --no-engine",
|
||||
"build": "npx prisma migrate deploy && next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
"postinstall": "npx prisma generate --no-engine"
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@auth/prisma-adapter": "^2.10.0",
|
||||
|
||||
Reference in New Issue
Block a user