@sdflc/backend-helpers 1.0.37 → 1.0.38

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.
@@ -204,19 +204,19 @@ var BaseGateway = /** @class */ (function () {
204
204
  return __generator(this, function (_b) {
205
205
  _a = this.config, hasRemovedAt = _a.hasRemovedAt, hasRemovedAtStr = _a.hasRemovedAtStr, hasStatus = _a.hasStatus, hasRemovedBy = _a.hasRemovedBy;
206
206
  removalTime = (0, dayjs_1.default)();
207
- obj = __assign({}, args);
207
+ obj = __assign({}, (args || {}));
208
208
  if (hasRemovedAt) {
209
209
  obj[constants_1.FIELDS.REMOVED_AT] = removalTime.toDate();
210
210
  }
211
211
  if (hasRemovedAtStr === true) {
212
212
  obj[constants_1.FIELDS.REMOVED_AT_STR] = removalTime.format('YYYYMMDDTHHmmssZ');
213
213
  }
214
- if (hasStatus === true) {
214
+ if (hasStatus) {
215
215
  obj[constants_1.FIELDS.STATUS] = utils_1.STATUSES.REMOVED;
216
216
  }
217
217
  if (hasRemovedBy) {
218
- if (args[constants_1.FIELDS.REMOVED_BY] === undefined) {
219
- args[constants_1.FIELDS.REMOVED_BY] = this.getContext().userId;
218
+ if (obj[constants_1.FIELDS.REMOVED_BY] === undefined) {
219
+ obj[constants_1.FIELDS.REMOVED_BY] = this.getContext().userId;
220
220
  }
221
221
  }
222
222
  return [2 /*return*/, obj];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdflc/backend-helpers",
3
- "version": "1.0.37",
3
+ "version": "1.0.38",
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",