how to call default blueprint actions in a custom overridden one?

后端 未结 3 1178
情歌与酒
情歌与酒 2021-02-08 04:21

SailsJS provides default blueprint actions, such as find, update, create, etc.

I need to override some of them to suit particular business purposes. However, I would lik

3条回答
  •  面向向阳花
    2021-02-08 05:10

    copy everything from

    PROJECT-ROOT\node_modules\sails\lib\hooks\blueprints\actions
    

    to

    PROJECT-ROOT\config\blueprints
    

    Make sure findOne.js is lowercase. You will need to modify each one to make reference to the location of actionUtil.js. You can now modify these at your hearts content without re-inventing the wheel.

提交回复
热议问题