- Sending Newsletter, others settings.
This commit is contained in:
@@ -49,7 +49,7 @@ SettingsSchema.statics.executeQueryTable = function (idapp, params) {
|
||||
return tools.executeQueryTable(this, idapp, params);
|
||||
};
|
||||
|
||||
SettingsSchema.statics.getValDbSettings = function (idapp, key) {
|
||||
SettingsSchema.statics.getValDbSettings = function (idapp, key, def) {
|
||||
return Settings.findOne({ idapp, key })
|
||||
.then((myrec) => {
|
||||
// console.log('getValDbSettings', myrec, 'idapp', idapp);
|
||||
@@ -63,12 +63,12 @@ SettingsSchema.statics.getValDbSettings = function (idapp, key) {
|
||||
else
|
||||
return myrec.value_str;
|
||||
} else {
|
||||
return ''
|
||||
return def
|
||||
}
|
||||
|
||||
}).catch((err) => {
|
||||
console.error('getValDbSettings', err);
|
||||
return null;
|
||||
return def;
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user