lrf 2 년 전
부모
커밋
589770a0f6
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/service/view/order.js

+ 1 - 1
app/service/view/order.js

@@ -46,8 +46,8 @@ class OrderService extends CrudService {
     ];
     pipeline.push(...step2);
     pipeline.push({ $unwind: '$data' });
-    pipeline.push({ $match: { customer } });
     pipeline.push({ $replaceRoot: { newRoot: '$data' } });
+    pipeline.push({ $match: { customer } });
     const qp = _.cloneDeep(pipeline);
     qp.push({ $sort: { 'meta.createdAt': -1 } });
     if (skip && limit) qp.push({ $skip: parseInt(skip) }, { $limit: parseInt(limit) });