diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-02-13 14:18:19 +0100 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-02-13 14:18:19 +0100 |
commit | 54542ef34fd9ded5c89df8fa7c90e0099196dd00 (patch) | |
tree | 606bdbe85d6e10f2e67c937d168a298dc0fe2ce5 /src/util | |
parent | :zap: Config and database update (diff) | |
download | server-54542ef34fd9ded5c89df8fa7c90e0099196dd00.tar.xz |
:sparkles: Config init takes default opts
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/Config.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/Config.ts b/src/util/Config.ts index ad70d37a..83370df4 100644 --- a/src/util/Config.ts +++ b/src/util/Config.ts @@ -5,9 +5,9 @@ import db, { MongooseCache } from "./Database"; var Config = new MongooseCache(db.collection("config"), [], { onlyEvents: false }); export default { - init: async function init() { + init: async function init(defaultOpts: any = DefaultOptions) { await Config.init(); - return this.setAll(Config.data.merge(DefaultOptions)); + return this.setAll(Config.data.merge(defaultOpts)); }, getAll: function get() { return <DefaultOptions>Config.data; |