@nextage/nx-frame-be 1.0.12 → 1.0.14

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.
@@ -64,6 +64,20 @@ export declare abstract class BaseController<TAttrs, TDoc extends BaseMongoDoc,
64
64
  * @param item
65
65
  * @param context
66
66
  */
67
+ protected parseCreateItem(item: TAttrs, context: NxContext): Promise<void>;
68
+ /**
69
+ *
70
+ * @param id
71
+ * @param item
72
+ * @param context
73
+ */
74
+ protected parseUpdateItem(id: string, item: TAttrs, context: NxContext): Promise<void>;
75
+ /**
76
+ *
77
+ * @param item
78
+ * @param context
79
+ * @returns
80
+ */
67
81
  protected parseItem(item: TAttrs, context: NxContext): Promise<void>;
68
82
  /**
69
83
  *
@@ -57,8 +57,31 @@ class BaseController {
57
57
  * @param item
58
58
  * @param context
59
59
  */
60
+ parseCreateItem(item, context) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ yield this.parseItem(item, context);
63
+ });
64
+ }
65
+ /**
66
+ *
67
+ * @param id
68
+ * @param item
69
+ * @param context
70
+ */
71
+ parseUpdateItem(id, item, context) {
72
+ return __awaiter(this, void 0, void 0, function* () {
73
+ yield this.parseItem(item, context);
74
+ });
75
+ }
76
+ /**
77
+ *
78
+ * @param item
79
+ * @param context
80
+ * @returns
81
+ */
60
82
  parseItem(item, context) {
61
83
  return __awaiter(this, void 0, void 0, function* () {
84
+ return;
62
85
  });
63
86
  }
64
87
  /**
@@ -78,7 +101,7 @@ class BaseController {
78
101
  */
79
102
  create(item, context) {
80
103
  return __awaiter(this, void 0, void 0, function* () {
81
- yield this.parseItem(item, context);
104
+ yield this.parseCreateItem(item, context);
82
105
  return this.model.create(item, context);
83
106
  });
84
107
  }
@@ -91,7 +114,7 @@ class BaseController {
91
114
  */
92
115
  update(id, item, context) {
93
116
  return __awaiter(this, void 0, void 0, function* () {
94
- yield this.parseItem(item, context);
117
+ yield this.parseUpdateItem(id, item, context);
95
118
  return this.model.update(id, item, this.mergeUpdate, context);
96
119
  });
97
120
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextage/nx-frame-be",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",