mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-05 12:11:51 +02:00
Soft delete and house keeping endpoint (#184)
This commit is contained in:
parent
97e189132f
commit
3299ba2030
14 changed files with 326 additions and 14 deletions
|
@ -1,5 +1,7 @@
|
|||
import { PrismaClient } from "@prisma/client";
|
||||
|
||||
import { softDeleteMiddleware } from "./middlewares/softDeleteMiddleware";
|
||||
|
||||
declare global {
|
||||
// allow global `var` declarations
|
||||
// eslint-disable-next-line no-var
|
||||
|
@ -8,4 +10,6 @@ declare global {
|
|||
|
||||
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