aggiunto "Seen"
This commit is contained in:
@@ -1980,11 +1980,44 @@ module.exports = {
|
||||
as: 'mybook',
|
||||
},
|
||||
},
|
||||
{
|
||||
$lookup: {
|
||||
from: "users",
|
||||
let: {
|
||||
tab: numtab,
|
||||
id: '$_id',
|
||||
},
|
||||
pipeline: [
|
||||
{
|
||||
$unwind: '$profile.seen',
|
||||
},
|
||||
{
|
||||
$match: {
|
||||
$expr: {
|
||||
$and: [
|
||||
{ $eq: ['$profile.seen.id', '$$id'] },
|
||||
{ $eq: ['$profile.seen.tab', '$$tab'] },
|
||||
{ $eq: ['$idapp', idapp] },
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
$project: {
|
||||
username: 1, name: 1, surname: 1, 'profile.resid_province': 1, 'profile.img': 1,
|
||||
'profile.qualifica': 1,
|
||||
}
|
||||
},
|
||||
],
|
||||
as: 'myseen',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
proj = {
|
||||
myfav: 1,
|
||||
mybook: 1,
|
||||
myseen: 1,
|
||||
};
|
||||
|
||||
return { query, proj };
|
||||
|
||||
@@ -149,6 +149,7 @@ module.exports = {
|
||||
CMD_USER: {
|
||||
SET_FAVORITE: 1,
|
||||
SET_BOOKMARK: 2,
|
||||
SET_SEEN: 3,
|
||||
},
|
||||
|
||||
TABLES_ENABLE_GETREC_BYID: ['mybachecas', 'myhosps', 'myskills', 'mygoods'],
|
||||
@@ -579,6 +580,7 @@ module.exports = {
|
||||
'profile.username_telegram': 1,
|
||||
'profile.favorite': 1,
|
||||
'profile.bookmark': 1,
|
||||
'profile.seen': 1,
|
||||
reported: 1,
|
||||
date_report: 1,
|
||||
username_who_report: 1,
|
||||
|
||||
Reference in New Issue
Block a user