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.
17 lines
381 B
17 lines
381 B
8 years ago
|
"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.appflash = req.flash('alert');
|
||
|
|
||
|
next();
|
||
|
|
||
|
};
|