I'm using Sails.js and thus, Waterline and I'm wondering if the following is possible?
teamFind: function(req,res,next){
User.find().skip(req.param('listPage')).limit(26).sort('school').sort('officialUser').exec(function(err,users){
res.view({
teams:users,
nextPage: parseInt(req.param('listPage'),10)+26
});
});
},
What I'm wanting to do is return the users sorted by school and then move the "Official Users" to the top of that list. Currently this just returns everything in alphabetic order. Is the issue that 'officialUser' is a boolean?