Forked from anonymous/gist:fba8febb0f444a3b682a
Last active
February 11, 2016 06:08
-
-
Save tarlepp/e6221d04f26d773e86aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* UserProductsController | |
* | |
* @description :: Server-side logic for managing Userproducts | |
* @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers | |
*/ | |
module.exports = { | |
yourAction: function(req, res) { | |
sails.models.product.find().sort('heat ASC').exec(function (err, products){ | |
if (err) { | |
return res.negoatiate(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