Pagina con i link dei Canali territoriali di RISO

Lista Tabelle "Aggiungi" da errore userId...
Aggiunto "Servizi" e alcune sue sottocategorie
Aggiunto anche la conversione della foto piccola alla Foto Profilo
This commit is contained in:
paoloar77
2022-03-09 14:53:09 +01:00
parent 82e3ed7175
commit e79c22a038
13 changed files with 265 additions and 311 deletions

View File

@@ -86,6 +86,24 @@ MsgTemplateSchema.statics.getMsgByLang = async function (idapp, typemsg, lang) {
return { body: '', title: '' };
};
MsgTemplateSchema.statics.getMsgByTitleAndLang = async function (idapp, title, lang) {
const MsgTemplate = this;
try {
const mymsg = await MsgTemplate.findOne({ idapp, title });
if (!!mymsg) {
if ((!!mymsg["msg_" + lang]) && (!!mymsg["title_" + lang])) {
return { body: mymsg["msg_" + lang], title: mymsg["title_" + lang] }
}
}
} catch (e) {
return { body: '', title: '' };
}
return { body: '', title: '' };
};
MsgTemplateSchema.statics.findAllIdApp = async function (idapp) {
const MsgTemplate = this;