return updated settings
This commit is contained in:
1 parent
7c275db662
commit
7d333c6d93
3 files changed
+22
-16
No files matched your search
@@ -26,10 +26,12 @@ const updateAppSettings = async (newSettings) => {
|
||||
delete update.$set.systemEmailPassword;
|
||||
}
|
||||
|
||||
const settings = await AppSettings.findOneAndUpdate({}, update, {
|
||||
new: true,
|
||||
await AppSettings.findOneAndUpdate({}, update, {
|
||||
upsert: true,
|
||||
});
|
||||
const settings = await AppSettings.findOne()
|
||||
.select("-__v -_id -createdAt -updatedAt -singleton")
|
||||
.lean();
|
||||
return settings;
|
||||
} catch (error) {
|
||||
error.service = SERVICE_NAME;
|
||||
|
||||
Reference in new issue
Block a user