Sửa lỗi hiện danh sách trong bảng thêm thành viên
This commit is contained in:
Vendored
+5
-1
@@ -9,9 +9,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
};
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
import { PrismaPg } from '@prisma/adapter-pg';
|
||||
import { Pool } from 'pg';
|
||||
let PrismaService = class PrismaService extends PrismaClient {
|
||||
constructor() {
|
||||
super();
|
||||
const pool = new Pool({ connectionString: process.env.DATABASE_URL });
|
||||
const adapter = new PrismaPg(pool);
|
||||
super({ adapter });
|
||||
}
|
||||
async onModuleInit() { await this.$connect(); }
|
||||
async onModuleDestroy() { await this.$disconnect(); }
|
||||
|
||||
Reference in New Issue
Block a user