mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2025-12-17 15:12:14 +11:00
9 lines
240 B
JavaScript
9 lines
240 B
JavaScript
module.exports = {
|
|
ensureAuthenticated: function (req, res, next) {
|
|
if (req.session.user != undefined) {
|
|
return next();
|
|
}
|
|
req.flash("error_msg", "please login to view this resource");
|
|
res.redirect("/login");
|
|
},
|
|
};
|