Skip to content

Commit b7f2bde

Browse files
committed
fix affiliazione visite (con Claudio)
1 parent a7b6f54 commit b7f2bde

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

server/controllers/processes/visits.js

+13
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,23 @@ const GET_PIPELINE = [
174174
foreignField: '_id',
175175
as: 'referencePeople',
176176
pipeline: [
177+
{ $lookup: {
178+
from: 'institutions',
179+
localField: 'affiliations',
180+
foreignField: '_id',
181+
as: 'affiliations',
182+
pipeline: [
183+
{ $project: {
184+
_id: 1,
185+
name: 1,
186+
}},
187+
]
188+
}},
177189
{ $project: {
178190
_id: 1,
179191
firstName: 1,
180192
lastName: 1,
193+
affiliations: 1,
181194
email: 1,
182195
}},
183196
]

0 commit comments

Comments
 (0)