mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2025-12-16 23:02:13 +11:00
12 lines
255 B
JavaScript
12 lines
255 B
JavaScript
module.exports = {
|
|
checkAdmin: function (req, res, next) {
|
|
if (req.session.admin != false) {
|
|
if (req.session.admin != undefined) {
|
|
return next();
|
|
}
|
|
}
|
|
|
|
req.flash("error_msg", "admins only");
|
|
res.redirect("/");
|
|
},
|
|
};
|