c2-mongoose 2.1.166 → 2.1.167

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.
@@ -85,7 +85,7 @@ var C2Flow = /** @class */ (function () {
85
85
  case 1:
86
86
  dataAfter = _a.sent();
87
87
  if (options.logger === false) {
88
- return [2 /*return*/, dataAfter[0]._doc];
88
+ return [2 /*return*/, dataAfter];
89
89
  }
90
90
  log = BuildLogFlowItem_1.default.build(options, dataAfter[0]._doc, Logger_1.TypeOfOperation.CREATE, this.repository);
91
91
  return [4 /*yield*/, global.LoggerRepository.create([log], { session: options.session })];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.166",
3
+ "version": "2.1.167",
4
4
  "description": "Lib to make any search in database mongoose and use as basic crud",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -30,7 +30,7 @@ class C2Flow<D> {
30
30
  let dataAfter = await this.repository.create(data, { session: options.session })
31
31
 
32
32
  if (options.logger === false) {
33
- return dataAfter[0]._doc
33
+ return dataAfter
34
34
  }
35
35
 
36
36
  let log: Partial<ILogger> = BuildLogFlowItem.build(options, dataAfter[0]._doc, TypeOfOperation.CREATE, this.repository)