- Iscrizione Conacreis

This commit is contained in:
Paolo Arena
2021-06-04 10:07:57 +02:00
parent cf97870cc7
commit 9d5eda50ae
20 changed files with 3048 additions and 1525 deletions

View File

@@ -110,6 +110,9 @@ const MyPageSchema = new Schema({
l_child: {
type: Number,
},
internalpage: {
type: Boolean,
},
infooter: {
type: Boolean,
},
@@ -159,6 +162,23 @@ MyPageSchema.statics.findOnlyStruttRec = async function (idapp) {
});
};
MyPageSchema.statics.findInternalPages = async function (idapp) {
const MyPage = this;
const myfind = { idapp,
internalpage: { $exists: true, $eq: true }
};
return MyPage.find(myfind, {
title: 1,
path: 1,
onlyif_logged: 1,
only_residenti: 1,
}, (err, arrrec) => {
return arrrec
});
};
const MyPage = mongoose.model('MyPage', MyPageSchema);
module.exports = { MyPage };