diff --git a/src/modules/database.js b/src/modules/database.js index 72f4897..76d1c85 100644 --- a/src/modules/database.js +++ b/src/modules/database.js @@ -26,7 +26,7 @@ const serverSettingsDB = { put: async function (data) { const id = data.key delete data.key - await ServerSettings.findByIdAndUpdate(id, data) + await ServerSettings.findByIdAndUpdate(id, data, { new: true, upsert: true }) } }