From 5057c867075d511a4f8f14276aad965e9b1d8068 Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 30 Jun 2022 01:38:58 -0400 Subject: [PATCH] Fix read only db used by default --- src/databases/Postgres.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/databases/Postgres.ts b/src/databases/Postgres.ts index c52d7a5..b8ca3a8 100644 --- a/src/databases/Postgres.ts +++ b/src/databases/Postgres.ts @@ -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);