Skip to content

Commit

Permalink
hopefully fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanko2 committed Aug 8, 2024
1 parent dc1d429 commit 72af717
Show file tree
Hide file tree
Showing 5 changed files with 206 additions and 204 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,5 @@ dist

uploads/*
!uploads/config.json

!node_modules/@prisma/*
Binary file modified bun.lockb
Binary file not shown.
10 changes: 9 additions & 1 deletion db.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import { PrismaClient, type Item } from '@prisma/client'

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

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

const db = globalThis.prismaGlobal ?? prismaClientSingleton()

export default db

Expand Down
8 changes: 0 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"devDependencies": {
"@eslint/js": "^9.2.0",
"@types/bun": "latest",
"@types/katex": "^0.16.7",
"@types/markdown-it": "^14.1.2",
"@types/markdown-it-emoji": "^3.0.1",
"@types/react-dom": "^18.3.0",
"eslint": "^9.2.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
Expand All @@ -29,11 +26,6 @@
"@prisma/client": "^5.14.0",
"@tailwindcss/cli": "^4.0.0-alpha.15",
"get-video-duration": "^4.1.0",
"highlight.js": "^11.10.0",
"katex": "^0.16.11",
"markdown-it": "^14.1.0",
"markdown-it-emoji": "^3.0.0",
"markdown-it-texmath": "^1.0.0",
"react": "^19.0.0-rc-915b914b3a-20240515",
"react-dom": "^19.0.0-rc-915b914b3a-20240515",
"tailwindcss": "^4.0.0-alpha.15"
Expand Down
Loading

0 comments on commit 72af717

Please sign in to comment.