fixed issues check pachage.json note (untested)
This commit is contained in:
parent
f7f64473e6
commit
425c617f23
11 changed files with 119 additions and 125 deletions
|
@ -16,13 +16,9 @@ module.exports = {
|
|||
if (currentUser == null) return res.render('404.ejs')
|
||||
let currentServer = await Server.findOne({ id: req.params.serverid })
|
||||
if (currentServer == null) return res.render('404.ejs')
|
||||
let hasAccess = false;
|
||||
await currentUser.guilds.forEach(guild => {
|
||||
if (guild.userPermission == 'owner' || guild.userPermission == 'MANAGE_GUILD' || currentServer.staff.includes(currentUser.userId)) {
|
||||
hasAccess = true;
|
||||
};
|
||||
});
|
||||
if (hasAccess == true) {
|
||||
let guild = await currentUser.guilds[currentServer.id];
|
||||
if (guild.userPermission == 'owner' || guild.userPermission == 'MANAGE_GUILD' || currentServer.staff.includes(currentUser.userId)) {
|
||||
let hasAccess = false;
|
||||
let listedRoles = [];
|
||||
let listedChannels = [];
|
||||
let server = await client.guilds.cache.get(currentServer.id);
|
||||
|
@ -41,7 +37,7 @@ module.exports = {
|
|||
});
|
||||
if (hasAccess == false) return res.redirect('/login?ninvalidcode');
|
||||
} else {
|
||||
await res.status(401).render('error.ejs', { errorMessage: null, error: "you do not have access to the admin dashboard if you are a member of staff fill out http://knightrider.rf.gd/er/admin.php", userInfo: { id: req.query.userid, username: req.query.userame, avatar: req.query.userAvatar } })
|
||||
await res.status(401).render('error.ejs', { errorMessage: null, error: "you do not have access to the admin dashboard if you are a member of staff tell the bot owner", userInfo: { id: req.query.userid, username: req.query.userame, avatar: req.query.userAvatar } })
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue