1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-10 12:42:44 +01:00

🐛 fix Config

This commit is contained in:
Flam3rboy 2021-02-16 14:04:40 +01:00
parent 7dda31a10d
commit ce2567bbbd
3 changed files with 3 additions and 3 deletions

2
dist/util/Config.js vendored
View File

@ -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 = {

View File

@ -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,EAAE,EAAE;IACX,KAAK,EAAE,EAAE;CACT,CAAC;AAQW,QAAA,YAAY,GA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;AAEU,QAAA,WAAW,GAAG,gBAAK,CAAiB,QAAQ,EAAE,oBAAY,EAAE,QAAQ,CAAC,CAAC"}

View File

@ -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 });
},
};