2017-02-09 01:52:37 +00:00
|
|
|
'use strict'
|
2016-08-17 03:56:08 +00: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-11 03:00:03 +00:00
|
|
|
res.locals.flash = req.flash('alert')
|
2016-08-17 03:56:08 +00:00
|
|
|
|
2017-02-09 01:52:37 +00:00
|
|
|
next()
|
|
|
|
}
|