From 2f1e9696a8f1e637d9789302bc17aea2aadf8962 Mon Sep 17 00:00:00 2001 From: sparrow Date: Wed, 28 Jun 2023 02:11:02 +0100 Subject: [PATCH] empty object instead of undefined --- packages/backend/src/db/postgre.ts | 2 +- packages/backend/src/db/redis.ts | 2 +- packages/backend/src/queue/initialize.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/db/postgre.ts b/packages/backend/src/db/postgre.ts index 2295246eb1..a3f065e198 100644 --- a/packages/backend/src/db/postgre.ts +++ b/packages/backend/src/db/postgre.ts @@ -214,7 +214,7 @@ export const db = new DataSource({ tls: config.redis.tls ? { host: config.redis.host, rejectUnauthorized: false, // TODO make configurable - } : undefined, + } : {}, }, } : false, diff --git a/packages/backend/src/db/redis.ts b/packages/backend/src/db/redis.ts index e79b971081..0d353d3ce1 100644 --- a/packages/backend/src/db/redis.ts +++ b/packages/backend/src/db/redis.ts @@ -13,7 +13,7 @@ export function createConnection() { tls: config.redis.tls ? { rejectUnauthorized: false, //TODO make configurable host: config.redis.host, - } : undefined, + } : {}, }); } diff --git a/packages/backend/src/queue/initialize.ts b/packages/backend/src/queue/initialize.ts index 9a99d23e26..d5cf2b9087 100644 --- a/packages/backend/src/queue/initialize.ts +++ b/packages/backend/src/queue/initialize.ts @@ -12,7 +12,7 @@ export function initialize(name: string, limitPerSec = -1) { db: config.redis.db || 0, tls: config.redis.tls ? { host: config.redis.host, //TODO add configurable cert validation - } : undefined, + } : {}, }, prefix: config.redis.prefix ? `${config.redis.prefix}:queue` : "queue", limiter: