Skip to content

Instantly share code, notes, and snippets.

Created February 11, 2016 06:00
Show Gist options
  • Save anonymous/fba8febb0f444a3b682a to your computer and use it in GitHub Desktop.
Save anonymous/fba8febb0f444a3b682a to your computer and use it in GitHub Desktop.
/**
* UserProductsController
*
* @description :: Server-side logic for managing Userproducts
* @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers
*/
module.exports = {
};
// Find the 5 hottest oven brands on the market
Product.find().sort('heat ASC').exec(function (err, products){
if (err) return res.serverError(err);
return res.view('products/user', {
userProducts: products
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment