Tuesday, 15 May 2012

javascript - Limit accepted model attributes in Sailsjs? -



javascript - Limit accepted model attributes in Sailsjs? -

with sailsjs, can create model , add together new records:

http://localhost:1337/user/create

i can add together arbitrary attributes records:

http://localhost:1337/user/create?name=bob

how restrict or limit attributes can set on model? thought defining attributes in model it, appears can still set arbitrary attribute want.

also, side note, need "relift" sails every time alter model? there list somewhere of changes framework code require restarting sails?

you have set property schema true, way attributes defined in model's attributes object stored.

more info: http://sailsjs.org/#/documentation/concepts/orm/model-settings.html

javascript node.js sails.js

No comments:

Post a Comment