Skip to content

Instantly share code, notes, and snippets.

@hayksaakian
Created May 1, 2014 06:19
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 hayksaakian/9d7a69082513876447a9 to your computer and use it in GitHub Desktop.
Save hayksaakian/9d7a69082513876447a9 to your computer and use it in GitHub Desktop.
module.exports = function (req, res, next) {
res.locals.flash = {};
if(!req.session.flash) return next();
res.locals.flash = _.clone(req.session.flash);
req.session.flash = {};
next();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment