This commit is contained in:
JonnyBro 2022-01-13 21:44:19 +05:00
parent 43bb07d926
commit 10b3746819
2 changed files with 2 additions and 2 deletions

View file

@ -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,

View file

@ -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,