@loomcore/api 0.0.18 → 0.0.20

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.
@@ -326,17 +326,10 @@ export class GenericApiService {
326
326
  return transformedEntity;
327
327
  }
328
328
  stripSenderProvidedSystemProperties(doc) {
329
- if (doc._created) {
330
- delete doc._created;
331
- }
332
- if (doc._createdBy) {
333
- delete doc._createdBy;
334
- }
335
- if (doc._updated) {
336
- delete doc._updated;
337
- }
338
- if (doc._updatedBy) {
339
- delete doc._updatedBy;
329
+ for (const key in doc) {
330
+ if (Object.prototype.hasOwnProperty.call(doc, key) && key.startsWith('_')) {
331
+ delete doc[key];
332
+ }
340
333
  }
341
334
  }
342
335
  async preparePayload(userContext, entity, isCreate = false) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loomcore/api",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "private": false,
5
5
  "description": "Loom Core Api - An opinionated Node.js api using Typescript, Express, and MongoDb",
6
6
  "scripts": {