mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-10 12:42:44 +01:00
🐛 fix Config
This commit is contained in:
parent
7dda31a10d
commit
ce2567bbbd
2
dist/util/Config.js
vendored
2
dist/util/Config.js
vendored
@ -33,7 +33,7 @@ exports.default = {
|
||||
return Config.data;
|
||||
},
|
||||
setAll: function set(val) {
|
||||
return Database_1.default.collection("config").updateOne({}, { $set: val });
|
||||
return Database_1.default.collection("config").updateOne({}, { $set: val }, { upsert: true });
|
||||
},
|
||||
};
|
||||
exports.DefaultOptions = {
|
||||
|
2
dist/util/Config.js.map
vendored
2
dist/util/Config.js.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"file":"Config.js","sourceRoot":"","sources":["../../src/util/Config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA0D;AAC1D,uCAAqC;AACrC,uDAA+C;AAE/C,IAAI,MAAM,GAAG,IAAI,wBAAa,CAAC,kBAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;AAEnF,kBAAe;IACd,IAAI,EAAE,KAAK,UAAU,IAAI,CAAC,cAAmB,sBAAc;QAC1D,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;IACpD,CAAC;IACD,MAAM,EAAE,SAAS,GAAG;QACnB,OAAuB,MAAM,CAAC,IAAI,CAAC;IACpC,CAAC;IACD,MAAM,EAAE,SAAS,GAAG,CAAC,GAAQ;QAC5B,OAAO,kBAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;IAC7D,CAAC;CACD,CAAC;AAEW,QAAA,cAAc,GAAG;IAC7B,GAAG,EAAE,EAAE;IACP,OAAO,EA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E,MAAM;IACX,OAAO,EAAE,MAAM;IACf,KAAK,EAAE,MAAM;CACb,CAAC,CAAC;AAEU,QAAA,WAAW,GAAG,gBAAK,CAAiB,QAAQ,EAAE,oBAAY,EAAE,QAAQ,CAAC,CAAC"}
|
@ -13,7 +13,7 @@ export default {
|
||||
return <DefaultOptions>Config.data;
|
||||
},
|
||||
setAll: function set(val: any) {
|
||||
return db.collection("config").updateOne({}, { $set: val });
|
||||
return db.collection("config").updateOne({}, { $set: val }, { upsert: true });
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user