c2-mongoose 2.1.193 → 2.1.194
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 +6 -0
- package/package.json +1 -1
- package/src/flow/C2Flow.ts +7 -0
package/dist/flow/C2Flow.js
CHANGED
|
@@ -111,6 +111,9 @@ var C2Flow = /** @class */ (function () {
|
|
|
111
111
|
}
|
|
112
112
|
return [2 /*return*/, dataAfter._doc];
|
|
113
113
|
}
|
|
114
|
+
if ((0, Utils_1.isEmpty)(dataAfter)) {
|
|
115
|
+
return [2 /*return*/, dataAfter];
|
|
116
|
+
}
|
|
114
117
|
log = BuildLogFlowItem_1.default.build(options, __assign({ _id: _id }, data), Logger_1.TypeOfOperation.UPDATE, this.repository);
|
|
115
118
|
return [4 /*yield*/, global.LoggerRepository.create([log], { session: options.session })];
|
|
116
119
|
case 2:
|
|
@@ -137,6 +140,9 @@ var C2Flow = /** @class */ (function () {
|
|
|
137
140
|
}
|
|
138
141
|
return [2 /*return*/, dataAfter._doc];
|
|
139
142
|
}
|
|
143
|
+
if ((0, Utils_1.isEmpty)(dataAfter)) {
|
|
144
|
+
return [2 /*return*/, dataAfter];
|
|
145
|
+
}
|
|
140
146
|
log = BuildLogFlowItem_1.default.build(options, __assign({ _id: dataAfter._id }, data), Logger_1.TypeOfOperation.UPDATE, this.repository);
|
|
141
147
|
return [4 /*yield*/, global.LoggerRepository.create([log], { session: options.session })];
|
|
142
148
|
case 2:
|
package/package.json
CHANGED
package/src/flow/C2Flow.ts
CHANGED
|
@@ -49,6 +49,9 @@ class C2Flow<D> {
|
|
|
49
49
|
}
|
|
50
50
|
return dataAfter._doc
|
|
51
51
|
}
|
|
52
|
+
if (isEmpty(dataAfter)) {
|
|
53
|
+
return dataAfter
|
|
54
|
+
}
|
|
52
55
|
|
|
53
56
|
let log: Partial<ILogger> = BuildLogFlowItem.build(options, { _id, ...data }, TypeOfOperation.UPDATE, this.repository)
|
|
54
57
|
await (global as any).LoggerRepository.create([log], { session: options.session })
|
|
@@ -68,6 +71,10 @@ class C2Flow<D> {
|
|
|
68
71
|
return dataAfter._doc
|
|
69
72
|
}
|
|
70
73
|
|
|
74
|
+
if (isEmpty(dataAfter)) {
|
|
75
|
+
return dataAfter
|
|
76
|
+
}
|
|
77
|
+
|
|
71
78
|
let log: Partial<ILogger> = BuildLogFlowItem.build(options, { _id: dataAfter._id, ...data }, TypeOfOperation.UPDATE, this.repository)
|
|
72
79
|
await (global as any).LoggerRepository.create([log], { session: options.session })
|
|
73
80
|
if (isEmpty(dataAfter)) {
|