@chevre/domain 23.2.0-alpha.19 → 23.2.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -24,7 +24,7 @@ class EntranceGateRepo {
|
|
|
24
24
|
}
|
|
25
25
|
findEntranceGates(params) {
|
|
26
26
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
var _a, _b;
|
|
27
|
+
var _a, _b, _c;
|
|
28
28
|
const matchStages = [
|
|
29
29
|
{ $match: { _id: { $eq: new mongoose_1.Types.ObjectId(this.operator.id) } } }
|
|
30
30
|
];
|
|
@@ -32,6 +32,10 @@ class EntranceGateRepo {
|
|
|
32
32
|
if (typeof projectIdEq === 'string') {
|
|
33
33
|
matchStages.push({ $match: { 'project.id': { $eq: projectIdEq } } });
|
|
34
34
|
}
|
|
35
|
+
const identifierEq = (_c = params.identifier) === null || _c === void 0 ? void 0 : _c.$eq;
|
|
36
|
+
if (typeof identifierEq === 'string') {
|
|
37
|
+
matchStages.push({ $match: { 'hasEntranceGate.identifier': { $eq: identifierEq } } });
|
|
38
|
+
}
|
|
35
39
|
const aggregate = this.civicStructureModel.aggregate([
|
|
36
40
|
{
|
|
37
41
|
$unwind: {
|
package/package.json
CHANGED