node.js+mongoose - Is single rest endpoint enough to update a document with nested arrays? -


i'm developing rest api using node.js + mongoose. have model has few nested arrays within it. have put endpoint update document. add object sub-array, need separate endpoint or there way use same put endpoint? `

companyname: string, city: string, pincode: number, managers: [{     name: string,     dob: date,     gender: string,              highesteducation: string,     email: string,     phonenumbers: [{phonenumber: number}], }],` 

i have endpoint ../api/customer updating document. replaces existing document json im supplying. so, if want add manager (not replace existing manager), need seperate endpoint this? optimized solution?


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -