- Nuovo Sistema di Flotte per Tutor.
X - Mettere anche la email del sognatore, per chi è abituato ad inviarla in quel modo... X - Controllare che sul sito compaiano le informazioni del Sognatore...
This commit is contained in:
@@ -56,7 +56,7 @@ SettingsSchema.statics.getValDbSettings = function (idapp, key, def) {
|
||||
return Settings.findOne({ idapp, key })
|
||||
.then((myrec) => {
|
||||
// console.log('getValDbSettings', myrec, 'idapp', idapp);
|
||||
if (myrec) {
|
||||
if (!!myrec) {
|
||||
if (myrec.type === tools.FieldType.date)
|
||||
return myrec.value_date;
|
||||
else if (myrec.type === tools.FieldType.number)
|
||||
@@ -112,6 +112,8 @@ SettingsSchema.statics.setKeyNum = async function (idapp, key, value) {
|
||||
myrec = await Settings.findOneAndUpdate({ idapp, key }, { $set: { value_num: value } }, { new: false });
|
||||
}
|
||||
|
||||
return myrec
|
||||
|
||||
};
|
||||
|
||||
SettingsSchema.statics.setBool = async function (idapp, key, valbool) {
|
||||
@@ -130,6 +132,8 @@ SettingsSchema.statics.setBool = async function (idapp, key, valbool) {
|
||||
myrec = await Settings.findOneAndUpdate({ idapp, key }, { $set: { value_bool: valbool } }, { new: false });
|
||||
}
|
||||
|
||||
return myrec
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user