This commit is contained in:
Dmitry 2026-01-05 02:26:03 +03:00
parent bb499a4cc2
commit 642bee440e

View file

@ -3,6 +3,16 @@ import { PrismaClient } from '@prisma/client';
@Injectable() @Injectable()
export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy { export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy {
constructor() {
super({
datasources: {
db: {
url: process.env.DATABASE_URL,
},
},
});
}
async onModuleInit() { async onModuleInit() {
await this.$connect(); await this.$connect();
} }