Skip to content

Instantly share code, notes, and snippets.

@robwormald
Forked from jdcauley/gist:8984009
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robwormald/8984028 to your computer and use it in GitHub Desktop.
Save robwormald/8984028 to your computer and use it in GitHub Desktop.
module.exports = {
index: function (req,res) {
//empty object hold the data
var viewData = {}
viewData.user = req.user;
File.find( function foundFiles(err, files) {
if (err) return next(err);
// pass the array down to the /views/index.ejs page
viewData.files = files;
return res.view(viewData);
});
},
/**
* Overrides for the settings in `config/controllers.js`
* (specific to AuthController)
*/
_config: {}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment