feat: Implement file cleanup middleware for automatic old file deletion using local and Cloudinary storage providers.
This commit is contained in:
@@ -3,7 +3,10 @@ import { prismaAdapter } from 'better-auth/adapters/prisma';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
import { admin } from 'better-auth/plugins';
|
||||
|
||||
import { applyFileCleanup } from '../prisma/file-cleanup.helper';
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
applyFileCleanup(prisma);
|
||||
|
||||
export const auth = betterAuth({
|
||||
database: prismaAdapter(prisma, {
|
||||
|
||||
Reference in New Issue
Block a user