mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-03 19:21:51 +02:00
♻️ Refactor email templating code (#533)
This commit is contained in:
parent
0a836aeec7
commit
309cb109aa
79 changed files with 3926 additions and 1455 deletions
|
@ -1 +1,17 @@
|
|||
import { PrismaClient } from "@rallly/database";
|
||||
|
||||
import { softDeleteMiddleware } from "./middleware/soft-delete-middleware";
|
||||
|
||||
export * from "@prisma/client";
|
||||
|
||||
declare global {
|
||||
// allow global `var` declarations
|
||||
// eslint-disable-next-line no-var
|
||||
var prisma: PrismaClient | undefined;
|
||||
}
|
||||
|
||||
export const prisma = global.prisma || new PrismaClient();
|
||||
|
||||
softDeleteMiddleware(prisma, "Poll");
|
||||
|
||||
if (process.env.NODE_ENV !== "production") global.prisma = prisma;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue