add again

This commit is contained in:
Barış Soner Uşaklı
2023-06-15 19:33:41 -04:00
parent a7375a85ba
commit 9198a95173
8 changed files with 382 additions and 37 deletions

View File

@@ -45,9 +45,9 @@ postgresModule.questions = [
},
];
postgresModule.init = async function () {
postgresModule.init = async function (opts) {
const { Pool } = require('pg');
const connOptions = connection.getConnectionOptions();
const connOptions = connection.getConnectionOptions(opts);
const pool = new Pool(connOptions);
postgresModule.pool = pool;
postgresModule.client = pool;