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
378 B
16 lines
378 B
8 years ago
|
'use strict'
|
||
8 years ago
|
|
||
|
/**
|
||
|
* 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) => {
|
||
8 years ago
|
res.locals.appflash = req.flash('alert')
|
||
8 years ago
|
|
||
8 years ago
|
next()
|
||
|
}
|