From 70f071180c932e9cf5029b47ec5e0d1e2623b4b4 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Tue, 24 Dec 2024 15:05:33 -0500 Subject: Dashboard, fixed some issues with port --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'index.js') diff --git a/index.js b/index.js index c109ab2..f82209b 100644 --- a/index.js +++ b/index.js @@ -62,13 +62,13 @@ app.use(passport.session()); // Routes app.get("/", async (req, res) => { if (req.isAuthenticated()) { - const { id, username, email, guilds } = req.user; + const { id, guilds } = req.user; const isInGuild = guilds.some((guild) => guild.id === process.env.GUILD_ID); if (isInGuild) { - let userExists = true; + let userExists = false; if (userExists) { - return res.render('login'); + return res.render('dashboard', req.user); } else { return res.render('register', req.user); } @@ -137,4 +137,4 @@ app.get("/logout", (req, res) => { }); const port = 3000; -app.listen(PORT, () => console.log(`Server running on http://localhost:${port}`)); +app.listen(port, () => console.log(`Server running on http://localhost:${port}`)); -- cgit v1.2.3