@chevre/domain 20.2.0-alpha.38 → 20.2.0-alpha.39
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.
package/lib/chevre/repo/order.js
CHANGED
|
@@ -769,13 +769,9 @@ class MongoRepository {
|
|
|
769
769
|
/**
|
|
770
770
|
* 注文番号から注文を取得する
|
|
771
771
|
*/
|
|
772
|
-
findByOrderNumber(params) {
|
|
772
|
+
findByOrderNumber(params, projection) {
|
|
773
773
|
return __awaiter(this, void 0, void 0, function* () {
|
|
774
|
-
const doc = yield this.orderModel.findOne({ orderNumber: params.orderNumber }, {
|
|
775
|
-
__v: 0,
|
|
776
|
-
createdAt: 0,
|
|
777
|
-
updatedAt: 0
|
|
778
|
-
})
|
|
774
|
+
const doc = yield this.orderModel.findOne({ orderNumber: params.orderNumber }, Object.assign({ __v: 0, createdAt: 0, updatedAt: 0 }, projection))
|
|
779
775
|
.exec();
|
|
780
776
|
if (doc === null) {
|
|
781
777
|
throw new factory.errors.NotFound(this.orderModel.modelName);
|
package/package.json
CHANGED