Skip to content

Instantly share code, notes, and snippets.

@clayperez
Created February 25, 2016 16:45
Show Gist options
  • Save clayperez/29a1d724721ee2d42270 to your computer and use it in GitHub Desktop.
Save clayperez/29a1d724721ee2d42270 to your computer and use it in GitHub Desktop.
////////////////////////
/// PRIVILEGED ROUTES //
////////////////////////
///
///
///
module.exports = function(app,stormpath){
app.get('/dashboard', stormpath.loginRequired, function(req, res){
res.locals.stripeKey = process.env.STRIPE_PUBLISHABLE_KEY;
res.locals.user = req.user;
// customData defaults to keep things from breaking.
res.locals.user.customData = res.locals.user.customData || {};
res.locals.user.customData.stripe = res.locals.user.customData.stripe || {};
res.locals.user.customData.rhesus = res.locals.user.customData.rhesus || {};
res.render('dashboard');
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment