I am working on sailsjs, I created a model and api controller. I'm just wondering if I can publish and create many records of this model, and not use curl on the command line again and again. Does this quiet interface also support the delete method and update method for multiple lines at the same time?
thanks
Most of this information is in the docs http://sailsjs.org/#/documentation/reference/blueprint-api
By default, you can create several records at once in one post. Put an array of records to create.
For updating and deleting, I believe you need to set up your drawings to find an array of identifiers. Waterline, the foundation of ORM Sails, supports multi-line creation and deletion, although be sure to turn off associations http://sailsjs.org/#/documentation/reference/waterline/models/update.html?q=notes
To override drawings, create your own drawings in api/blueprints/ for example. api/blueprints/update.js and make them look for an array of identifiers. You probably want to start with the default drawings https://github.com/balderdashy/sails/tree/master/lib/hooks/blueprints/actions .
api/blueprints/
api/blueprints/update.js
In addition, you will need to define your own routes, since the update and delete actions are bound by default to PUT 'controller/:id' and DELETE 'controller/:id' respectively, which essentially allows you to use only one id.
update
delete
PUT 'controller/:id'
DELETE 'controller/:id'
Source: https://habr.com/ru/post/1202941/More articles:Cannot start application with new Xcode 6 - iosSplit a string by an integer followed by a space - javaJava Servlet: best way to determine if an AJAX request is - javaSVG in img tag does not load as image in firefox - html5I want to check words for duplicate characters in an input field using regex - javascriptUnable to run application in Simulator: Xcode 6.0.1 iOS 8 - iosHow to request relationships in NoSQL? - mongodbhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1202944/sitecore-item-buckets-when-user-doesnt-have-read-access-to-all-items&usg=ALkJrhiOJ42LeEKcOYl1pqfdDOho7tBa7Ago - print without spaces between elements - goJava EE 7: Get @Schedule date when set to persistent = true - java-eeAll Articles