@nextage/nx-frame-be 1.0.6 → 1.0.7

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.
@@ -57,6 +57,12 @@ export declare abstract class BaseController<TAttrs, TDoc extends BaseMongoDoc,
57
57
  * @returns
58
58
  */
59
59
  get(id: string, context?: NxContext): Promise<TDoc | null>;
60
+ /**
61
+ *
62
+ * @param item
63
+ * @param context
64
+ */
65
+ protected parseItem(item: TAttrs, context: NxContext): void;
60
66
  /**
61
67
  *
62
68
  * @param params
@@ -50,6 +50,13 @@ class BaseController {
50
50
  return this.model.get(id, context);
51
51
  });
52
52
  }
53
+ /**
54
+ *
55
+ * @param item
56
+ * @param context
57
+ */
58
+ parseItem(item, context) {
59
+ }
53
60
  /**
54
61
  *
55
62
  * @param params
@@ -66,6 +73,7 @@ class BaseController {
66
73
  * @returns
67
74
  */
68
75
  create(item, context) {
76
+ this.parseItem(item, context);
69
77
  return this.model.create(item, context);
70
78
  }
71
79
  /**
@@ -76,6 +84,7 @@ class BaseController {
76
84
  * @returns
77
85
  */
78
86
  update(id, item, context) {
87
+ this.parseItem(item, context);
79
88
  return this.model.update(id, item, context);
80
89
  }
81
90
  /**
@@ -152,7 +152,7 @@ exports.isBoolean = isBoolean;
152
152
  * @param {*} value
153
153
  */
154
154
  function isString(value) {
155
- return lodash_1.default.isString(typeof value === 'string');
155
+ return lodash_1.default.isString(value);
156
156
  }
157
157
  exports.isString = isString;
158
158
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextage/nx-frame-be",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",