Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Movido o login filter para um módulo separado

  • Loading branch information...
commit 20710d4c700f1397467228700bc08898b68d9279 1 parent 1812ff9
Emerson Macedo authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 filters/admin.js
View
8 filters/admin.js
@@ -0,0 +1,8 @@
+exports.verifyLogin = function (req, res, next) {
+ // verifies if user is an admin
+
+ if(!req.session.username) {
+ return res.redirect("/admin/login");
+ }
+ next();
+};
Please sign in to comment.
Something went wrong with that request. Please try again.