Fix read only db used by default

This commit is contained in:
Ajay
2022-06-30 01:38:58 -04:00
parent b1b40d410f
commit 5057c86707

View File

@@ -47,7 +47,7 @@ export class Postgres implements IDatabase {
}
});
if (this.config.postgresReadOnly) {
if (this.config.postgresReadOnly && this.config.postgresReadOnly.enabled) {
this.poolRead = new Pool(this.config.postgresReadOnly);
this.poolRead.on("error", (err, client) => {
Logger.error(err.stack);