Skip to content

Commit 2098cc0

Browse files
author
joeltaylor
committed
Redirect to sign_in for admin
1 parent 4035a99 commit 2098cc0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/routes/admin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ var debug = require('debug')('JavaScript.com:server');
1717

1818
function ensureAuthenticated(req, res, next) {
1919
if (req.isAuthenticated()) { return next(); }
20-
req.flash('Please log in.');
21-
res.redirect('/')
20+
req.session.returnTo = '/admin'
21+
res.redirect('/news/sign_in')
2222
}
2323

2424
/* Admin role */

0 commit comments

Comments
 (0)