fix(sqlserver): changed to proper pool connection
This commit is contained in:
@@ -8,7 +8,7 @@ import { createLog } from "../logger/logger.js";
|
||||
import { serverSettings } from "../server/controller/settings/getSettings.js";
|
||||
import { prodSqlConfig } from "./utils/prodServerConfig.js";
|
||||
|
||||
let pool: any;
|
||||
let pool: sql.ConnectionPool;
|
||||
let connected: boolean = false;
|
||||
export const initializeProdPool = async () => {
|
||||
if (!installed) {
|
||||
@@ -88,7 +88,8 @@ export const initializeProdPool = async () => {
|
||||
}
|
||||
try {
|
||||
const config = await prodSqlConfig();
|
||||
pool = await sql.connect(config!);
|
||||
pool = new sql.ConnectionPool(config!)
|
||||
await pool.connect();
|
||||
|
||||
createLog(
|
||||
"info",
|
||||
|
||||
Reference in New Issue
Block a user