Update updatefilter.js
This commit is contained in:
parent
d4dd8974b5
commit
0e56bb603d
1 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@ module.exports = {
|
||||||
let currentServer = await Server.findOne({ id: req.body.server.id });
|
let currentServer = await Server.findOne({ id: req.body.server.id });
|
||||||
if (currentServer == null) return res.status(404).json({ error: "404 - cant find that server in the db" });
|
if (currentServer == null) return res.status(404).json({ error: "404 - cant find that server in the db" });
|
||||||
let gAccess = false;
|
let gAccess = false;
|
||||||
await currentUser.guilds.forEach(guild => {
|
await currentUser.guilds.forEach(async (guild) => {
|
||||||
if (guild.id == currentServer.id) {
|
if (guild.id == currentServer.id) {
|
||||||
gAccess = true;
|
gAccess = true;
|
||||||
if (guild.userPermission == 'owner' || guild.userPermission == 'MANAGE_GUILD' || currentServer.staff.includes(currentUser.userId)) {
|
if (guild.userPermission == 'owner' || guild.userPermission == 'MANAGE_GUILD' || currentServer.staff.includes(currentUser.userId)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue