hola-server 0.6.13 → 0.6.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.
- package/db/entity.js +2 -2
- package/package.json +1 -1
- package/router/create.js +1 -1
- package/router/update.js +1 -1
package/db/entity.js
CHANGED
|
@@ -239,7 +239,7 @@ class Entity {
|
|
|
239
239
|
* @returns object with code and err
|
|
240
240
|
*/
|
|
241
241
|
async create_entity(param_obj, view) {
|
|
242
|
-
const fields = this.meta.create_fields.filter(field => field.view == view);
|
|
242
|
+
const fields = view == "*" ? this.meta.create_fields : this.meta.create_fields.filter(field => field.view == view);
|
|
243
243
|
const { obj, error_field_names } = convert_type(param_obj, fields);
|
|
244
244
|
if (error_field_names.length > 0) {
|
|
245
245
|
if (is_log_error()) {
|
|
@@ -402,7 +402,7 @@ class Entity {
|
|
|
402
402
|
*
|
|
403
403
|
*/
|
|
404
404
|
async update_entity(_id, param_obj, view) {
|
|
405
|
-
const fields = this.meta.update_fields.filter(field => field.view == view);
|
|
405
|
+
const fields = view == "*" ? this.meta.update_fields : this.meta.update_fields.filter(field => field.view == view);
|
|
406
406
|
|
|
407
407
|
const { obj, error_field_names } = convert_update_type(param_obj, fields);
|
|
408
408
|
if (error_field_names.length > 0) {
|
package/package.json
CHANGED
package/router/create.js
CHANGED
package/router/update.js
CHANGED