++ aggiunta la prenotazione negli eventi. con la lista degli utenti.
This commit is contained in:
@@ -150,6 +150,7 @@ MyGoodSchema.statics.getMyRecById = function (idapp, idGood) {
|
||||
|
||||
let myparsid = {
|
||||
'_id': idGood,
|
||||
idapp,
|
||||
};
|
||||
|
||||
let query = [
|
||||
@@ -157,11 +158,6 @@ MyGoodSchema.statics.getMyRecById = function (idapp, idGood) {
|
||||
'$match':
|
||||
myparsid,
|
||||
},
|
||||
{
|
||||
'$match': {
|
||||
'idapp': idapp,
|
||||
},
|
||||
},
|
||||
{
|
||||
'$sort': {
|
||||
'desc': 1,
|
||||
@@ -309,11 +305,11 @@ MyGoodSchema.statics.getMyRecById = function (idapp, idGood) {
|
||||
const objadd = tools.addNumFavoriteAndBookmarkToQuery(idapp, numtab);
|
||||
query = [...query, ...objadd.query];
|
||||
|
||||
query = [...query,
|
||||
{
|
||||
$project: this.getProject(objadd.proj),
|
||||
}
|
||||
];
|
||||
const toadd = {
|
||||
$project: this.getProject(objadd.proj),
|
||||
};
|
||||
|
||||
query = [...query, {...toadd}];
|
||||
|
||||
return MyGood.aggregate(query).then((rec) => {
|
||||
return rec ? rec[0] : null;
|
||||
|
||||
Reference in New Issue
Block a user