Adjust pis query to check last element
Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
parent
1c944e9ae1
commit
3017981090
@ -16,9 +16,9 @@ async function findPisByOrigDest(start,end) {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
$expr: {
|
$expr: {
|
||||||
$eq: [
|
$and: [
|
||||||
{ $arrayElemAt: [ "$stops", 0 ] },
|
{ $eq: [{ $arrayElemAt: [ "$stops", -1 ] }, lastCrs] },
|
||||||
firstCrs
|
{ $eq: [{ $arrayElemAt: [ "$stops", 0 ] }, firstCrs] }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user