Skip to content

Commit 44f253b

Browse files
committed
fix: remove @prisma/extension-accelerate integration from Prisma client
1 parent f806242 commit 44f253b

6 files changed

Lines changed: 1 addition & 18 deletions

File tree

bun.lock

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"@ducanh2912/next-pwa": "^10.2.8",
1515
"@hookform/resolvers": "^3.9.0",
1616
"@prisma/client": "^5.22.0",
17-
"@prisma/extension-accelerate": "^1.2.0",
1817
"@radix-ui/react-alert-dialog": "^1.1.1",
1918
"@radix-ui/react-avatar": "^1.1.0",
2019
"@radix-ui/react-dialog": "^1.1.1",

src/app/api/post/feed/route.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ export async function GET(req: NextRequest) {
1414
return Response.json({ error: "Unauthorized" }, { status: 401 });
1515

1616
const posts = await prisma.post.findMany({
17-
cacheStrategy: {
18-
ttl: 60,
19-
swr: 10,
20-
},
2117
where: {
2218
parentId: null,
2319
},

src/app/api/post/profile-feed/route.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ export async function GET(req: NextRequest, ctx: any) {
2929
session.user.id === userId ? { userId } : { userId, isAnon: false };
3030

3131
const posts = await prisma.post.findMany({
32-
cacheStrategy: {
33-
ttl: 60,
34-
swr: 10,
35-
},
3632
where: whereCondition,
3733
include: PostDataInclude,
3834
orderBy: {

src/app/api/user/[userId]/follower/route.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ export async function GET(req: Request, ctx: any) {
1414
const loggedInUser = session.user;
1515

1616
const user = await prisma.user.findUnique({
17-
cacheStrategy: {
18-
ttl: 60,
19-
swr: 10,
20-
},
2117
where: { id: userId },
2218
select: {
2319
follower: {

src/lib/prisma.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { PrismaClient } from "@prisma/client/edge";
2-
import { withAccelerate } from "@prisma/extension-accelerate";
32

4-
const prisma = new PrismaClient().$extends(withAccelerate());
3+
const prisma = new PrismaClient();
54

65
export { prisma };

0 commit comments

Comments
 (0)