- Iscrizione Conacreis
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user