2017-02-08 20:52:37 -05:00
|
|
|
'use strict'
|
2016-08-16 23:56:08 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Flash middleware
|
|
|
|
*
|
|
|
|
* @param {Express Request} req Express Request object
|
|
|
|
* @param {Express Response} res Express Response object
|
|
|
|
* @param {Function} next Next callback function
|
|
|
|
* @return {any} void
|
|
|
|
*/
|
|
|
|
module.exports = (req, res, next) => {
|
2017-09-10 23:00:03 -04:00
|
|
|
res.locals.flash = req.flash('alert')
|
2016-08-16 23:56:08 -04:00
|
|
|
|
2017-02-08 20:52:37 -05:00
|
|
|
next()
|
|
|
|
}
|