c2-mongoose 2.1.206 → 2.1.207
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.
|
@@ -9,9 +9,9 @@ var BuildLogFlowItem = /** @class */ (function () {
|
|
|
9
9
|
function BuildLogFlowItem() {
|
|
10
10
|
}
|
|
11
11
|
BuildLogFlowItem.prototype.build = function (options, dataAfter, operation, repository) {
|
|
12
|
-
var _a;
|
|
12
|
+
var _a, _b;
|
|
13
13
|
return {
|
|
14
|
-
user: new mongoose_1.Types.ObjectId((_a = options.user) !== null && _a !== void 0 ? _a : express_http_context_1.default.get("user")._id),
|
|
14
|
+
user: new mongoose_1.Types.ObjectId((_a = options.user) !== null && _a !== void 0 ? _a : (_b = express_http_context_1.default.get("user")) === null || _b === void 0 ? void 0 : _b._id),
|
|
15
15
|
owner: new mongoose_1.Types.ObjectId(options.owner),
|
|
16
16
|
data: dataAfter,
|
|
17
17
|
collectionName: repository.collection.name,
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ import mongoose, { Types } from "mongoose"
|
|
|
6
6
|
class BuildLogFlowItem {
|
|
7
7
|
build(options: Partial<Options>, dataAfter: any, operation: TypeOfOperation, repository: mongoose.Model<any>): Partial<ILogger> {
|
|
8
8
|
return {
|
|
9
|
-
user: new Types.ObjectId(options.user ?? httpContext.get("user")
|
|
9
|
+
user: new Types.ObjectId(options.user ?? httpContext.get("user")?._id),
|
|
10
10
|
owner: new Types.ObjectId(options.owner),
|
|
11
11
|
data: dataAfter,
|
|
12
12
|
collectionName: repository.collection.name,
|