-
-
Save robwormald/8984028 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
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