@chevre/domain 21.4.0-alpha.32 → 21.4.0-alpha.33
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.
|
@@ -274,7 +274,7 @@ class MongoRepository {
|
|
|
274
274
|
* メンバーの権限を持つプロジェクト検索
|
|
275
275
|
*/
|
|
276
276
|
searchProjectIdsByMemberId(params) {
|
|
277
|
-
var _a, _b;
|
|
277
|
+
var _a, _b, _c, _d;
|
|
278
278
|
return __awaiter(this, void 0, void 0, function* () {
|
|
279
279
|
if (typeof params.limit !== 'number') {
|
|
280
280
|
throw new factory.errors.ArgumentNull('limit');
|
|
@@ -283,7 +283,10 @@ class MongoRepository {
|
|
|
283
283
|
throw new factory.errors.ArgumentNull('page');
|
|
284
284
|
}
|
|
285
285
|
const matchStages = [{ $match: { 'member.id': { $eq: params.member.id } } }];
|
|
286
|
-
if (typeof ((_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$
|
|
286
|
+
if (typeof ((_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$eq) === 'string') {
|
|
287
|
+
matchStages.push({ $match: { 'project.id': { $eq: params.project.id.$eq } } });
|
|
288
|
+
}
|
|
289
|
+
if (typeof ((_d = (_c = params.project) === null || _c === void 0 ? void 0 : _c.id) === null || _d === void 0 ? void 0 : _d.$regex) === 'string' && params.project.id.$regex.length > 0) {
|
|
287
290
|
matchStages.push({ $match: { 'project.id': { $regex: new RegExp(params.project.id.$regex) } } });
|
|
288
291
|
}
|
|
289
292
|
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
package/package.json
CHANGED