1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-10 04:32:35 +01:00

Don't override existing config values

This commit is contained in:
Madeline 2022-12-19 18:35:36 +11:00
parent 20359e7b9f
commit b67ded04ef
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47

View File

@ -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.`);