c2-mongoose 2.1.188 → 2.1.189
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/dist/flow/C2Flow.js +1 -1
- package/package.json +1 -1
- package/src/flow/C2Flow.ts +1 -1
package/dist/flow/C2Flow.js
CHANGED
|
@@ -102,7 +102,7 @@ var C2Flow = /** @class */ (function () {
|
|
|
102
102
|
var dataAfter, log;
|
|
103
103
|
return __generator(this, function (_a) {
|
|
104
104
|
switch (_a.label) {
|
|
105
|
-
case 0: return [4 /*yield*/, this.repository.findByIdAndUpdate(_id, data, { returnDocument: 'after',
|
|
105
|
+
case 0: return [4 /*yield*/, this.repository.findByIdAndUpdate(_id, data, __assign({ returnDocument: 'after' }, options))];
|
|
106
106
|
case 1:
|
|
107
107
|
dataAfter = _a.sent();
|
|
108
108
|
if (options.logger === false) {
|
package/package.json
CHANGED
package/src/flow/C2Flow.ts
CHANGED
|
@@ -41,7 +41,7 @@ class C2Flow<D> {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
async updateById(_id: Types.ObjectId, data: Partial<D>, options: Partial<Options>): Promise<Partial<D>> {
|
|
44
|
-
let dataAfter = await this.repository.findByIdAndUpdate(_id, data, { returnDocument: 'after',
|
|
44
|
+
let dataAfter = await this.repository.findByIdAndUpdate(_id, data, { returnDocument: 'after', ...options })
|
|
45
45
|
|
|
46
46
|
if (options.logger === false) {
|
|
47
47
|
if (isEmpty(dataAfter)) {
|