mirror of https://github.com/requarks/wiki
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.
16 lines
375 B
16 lines
375 B
'use strict'
|
|
|
|
/**
|
|
* 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) => {
|
|
res.locals.flash = req.flash('alert')
|
|
|
|
next()
|
|
}
|