You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
375 B

  1. 'use strict'
  2. /**
  3. * Flash middleware
  4. *
  5. * @param {Express Request} req Express Request object
  6. * @param {Express Response} res Express Response object
  7. * @param {Function} next Next callback function
  8. * @return {any} void
  9. */
  10. module.exports = (req, res, next) => {
  11. res.locals.flash = req.flash('alert')
  12. next()
  13. }