Soft delete and house keeping endpoint (#184)

This commit is contained in:
Luke Vella 2022-05-20 15:14:46 +01:00 committed by GitHub
parent 97e189132f
commit 3299ba2030
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 326 additions and 14 deletions

View file

@ -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;