I have user model and user Controller that I have generate from sails command. I just want call function that I created on model from controller like:
// user model
module.exports = {
attributes: {
name: {
type: 'string',
required: true
}
},
CallUserFunction: function(){
//some code goes here.
}
}
// userController
module.exports = {
create: function(req, res){
User.CallUserFunction();//can i call function in user Model like this?
}
}