Closed quantang closed 5 years ago
I've added 'create' event emit. As to the newly created item(s), please refer to yang-express/0.6.6/lib/restjson.js
Instead of having the List.create
return a conditional newly created item (if singular), it continues to return the main List property. However, you can now access the List.change
property to reference the list of changed list items. I've updated the yang-express restjson so that when you perform a POST (that may contain one or more list items) it returns the List.change
which would be one or more newly created items.
Yeah, that looks good to me. Cheers.
I found the yang-js does not emit 'create' event since we changed the list implementations. Besides, the 'create' function returns the list, instead of the newly created entity which is not convenient.
I will try to propose a change to make it later. Please feel free to share your thoughts if you have different opinions.