Last active
June 29, 2022 22:37
-
-
Save HussainArif12/3797a24ec83a833de038e07bc9ed274d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//filename: routes/index.js | |
const { ensureAuth, ensureGuest } = require("../middleware/auth"); | |
router.get("/", ensureGuest, (req, res) => { | |
res.render("login", { | |
layout: "login", | |
}); | |
}); | |
router.get("/dashboard", ensureAuth, (req, res) => { | |
res.render("dashboard"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment