@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
|
/**
|
package/build/common/utils.js
CHANGED