diff --git a/dashboard/routes/guild-stats.js b/dashboard/routes/guild-stats.js index d448d286..b4db8a36 100644 --- a/dashboard/routes/guild-stats.js +++ b/dashboard/routes/guild-stats.js @@ -6,7 +6,7 @@ const express = require("express"), router.get("/:serverID", CheckAuth, async (req, res) => { // Check if the user has the permissions to edit this guild const guild = req.client.guilds.cache.get(req.params.serverID); - if (!guild || !req.userInfos.displayedGuilds || !req.userInfos.displayedGuilds.find((g) => g.id === req.params.serverID)) { + if (!guild) { return res.render("404", { user: req.userInfos, translate: req.translate, diff --git a/dashboard/routes/user.js b/dashboard/routes/user.js index 3ed3e3d3..75570fd4 100644 --- a/dashboard/routes/user.js +++ b/dashboard/routes/user.js @@ -6,7 +6,7 @@ const express = require("express"), // Gets user page router.get("/:userID/:serverID", CheckAuth, async function (req, res) { const guild = req.client.guilds.cache.get(req.params.serverID); - if (!guild || !req.userInfos.displayedGuilds || !req.userInfos.displayedGuilds.find((g) => g.id === req.params.serverID)) { + if (!guild) { return res.render("404", { user: req.userInfos, translate: req.translate,