diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-12-19 18:35:36 +1100 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-12-19 18:35:36 +1100 |
commit | b67ded04ef083b09de4cddc403fe8e2f423bc37e (patch) | |
tree | 70a8d0229a83b67c41bd6172d3dfe6275a0aba69 | |
parent | Move UserSettings to own entity (diff) | |
download | server-b67ded04ef083b09de4cddc403fe8e2f423bc37e.tar.xz |
Don't override existing config values
-rw-r--r-- | src/util/util/Config.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/util/Config.ts b/src/util/util/Config.ts index ff2feb36..18e0b76c 100644 --- a/src/util/util/Config.ts +++ b/src/util/util/Config.ts @@ -17,7 +17,9 @@ export const Config = { console.log('[Config] Loading configuration...') pairs = await ConfigEntity.find(); config = pairsToConfig(pairs); - config = (config || {}).merge(new ConfigValue()); + // TODO: this overwrites existing config values with defaults. + // we actually want to extend the object with new keys instead. + // config = (config || {}).merge(new ConfigValue()); if (process.env.CONFIG_PATH) { console.log(`[Config] Using config path from environment rather than database.`); |