mirror of
https://github.com/zebrajr/express.git
synced 2025-12-06 12:19:51 +01:00
docs
This commit is contained in:
parent
d0a83053d3
commit
a078f5f5c1
|
|
@ -30,8 +30,11 @@ app.configure(function(){
|
|||
// Locals
|
||||
|
||||
app.locals.use(function(req, res){
|
||||
// expose "error" and "message" to all
|
||||
// views that are rendered.
|
||||
res.locals.error = req.session.error || '';
|
||||
res.locals.message = req.session.message || '';
|
||||
// remove them so they're not displayed on subsequent renders
|
||||
delete req.session.error;
|
||||
delete req.session.message;
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user