@sdflc/backend-helpers 1.0.44 → 1.0.45

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.
@@ -217,9 +217,9 @@ var BaseGateway = /** @class */ (function () {
217
217
  };
218
218
  BaseGateway.prototype.transformOnSet = function (params) {
219
219
  return __awaiter(this, void 0, void 0, function () {
220
- var _a, hasCreatedAt, hasCreatedBy, hasSpace, hasUpdatedAt, hasUpdatedBy, hasVersion, hasLang, localizationForField;
220
+ var _a, hasCreatedAt, hasCreatedBy, hasSpace, hasUpdatedAt, hasUpdatedBy, hasVersion, hasLang, localizationForField, hasUserId;
221
221
  return __generator(this, function (_b) {
222
- _a = this.config, hasCreatedAt = _a.hasCreatedAt, hasCreatedBy = _a.hasCreatedBy, hasSpace = _a.hasSpace, hasUpdatedAt = _a.hasUpdatedAt, hasUpdatedBy = _a.hasUpdatedBy, hasVersion = _a.hasVersion, hasLang = _a.hasLang, localizationForField = _a.localizationForField;
222
+ _a = this.config, hasCreatedAt = _a.hasCreatedAt, hasCreatedBy = _a.hasCreatedBy, hasSpace = _a.hasSpace, hasUpdatedAt = _a.hasUpdatedAt, hasUpdatedBy = _a.hasUpdatedBy, hasVersion = _a.hasVersion, hasLang = _a.hasLang, localizationForField = _a.localizationForField, hasUserId = _a.hasUserId;
223
223
  if (hasCreatedAt) {
224
224
  params[constants_1.FIELDS.CREATED_AT] = this.dateTime.dbFormat(this.dateTimeNow);
225
225
  }
@@ -228,6 +228,11 @@ var BaseGateway = /** @class */ (function () {
228
228
  params[constants_1.FIELDS.CREATED_BY] = this.getContext().userId;
229
229
  }
230
230
  }
231
+ if (hasUserId) {
232
+ if (params[constants_1.FIELDS.USER_ID] === undefined) {
233
+ params[constants_1.FIELDS.USER_ID] = this.getContext().userId;
234
+ }
235
+ }
231
236
  if (hasSpace) {
232
237
  params[constants_1.FIELDS.SPACE_ID] = this.getContext().spaceId;
233
238
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdflc/backend-helpers",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "description": "Set of helper functions and classes to simplify building backend apps within @sdflc ecosystem",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",