Skip to content

The Open Source DocuSign Alternative.

chore(prisma): remove unregistered middleware (#3345)

Ephraim Duncan0f71a8b67d83
diff --git a/packages/prisma/prisma-middleware.ts b/packages/prisma/prisma-middleware.ts
deleted file mode 100644
index 8653c1e3f..000000000
--- a/packages/prisma/prisma-middleware.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import type { PrismaClient } from '@prisma/client';
-
-export function addPrismaMiddleware(prisma: PrismaClient) {
- prisma.$use(async (params, next) => {
- // Check if we're creating a new team
- if (params.model === 'Team' && params.action === 'create') {
- // Execute the team creation
- const result = await next(params);
-
- // Create the TeamGlobalSettings
- await prisma.teamGlobalSettings.create({
- data: {
- teamId: result.id,
- },
- });
-
- return result;
- }
-
- // For all other operations, just pass through
- return next(params);
- });
-
- return prisma;
-}