update loadSettings logic to prioritize db env values for testing

This commit is contained in:
Vishnu Sreekumaran Nair committed 2025-05-05 16:02:59 -04:00
1 parent 2f8981e379
commit cc454ab519
1 file changed
+2 -5
+2 -5
View File
@@ -48,12 +48,9 @@ class SettingsService {
// If there are any settings that weren't set by environment variables, use user settings from DB
for (const key in envConfig) {
if (
typeof envConfig?.[key] === "undefined" &&
typeof dbSettings?.[key] !== "undefined"
) {
if (typeof dbSettings?.[key] !== "undefined") {
this.settings[key] = dbSettings[key];
}
}
}
await this.appSettings.updateOne({}, { $set: this.settings }, { upsert: true });