From 10b3746819a92174acd25bc314ce42ab2ffbb97d Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Thu, 13 Jan 2022 21:44:19 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboard/routes/guild-stats.js | 2 +- dashboard/routes/user.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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,