From 0e56bb603ded75041e69bd67ce589e5114fb14f9 Mon Sep 17 00:00:00 2001 From: 404invalid-user Date: Mon, 30 Aug 2021 13:36:33 +0100 Subject: [PATCH] Update updatefilter.js --- src/express/post/api/updatefilter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/express/post/api/updatefilter.js b/src/express/post/api/updatefilter.js index 377680f..171061f 100644 --- a/src/express/post/api/updatefilter.js +++ b/src/express/post/api/updatefilter.js @@ -14,7 +14,7 @@ module.exports = { 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" }); let gAccess = false; - await currentUser.guilds.forEach(guild => { + await currentUser.guilds.forEach(async (guild) => { if (guild.id == currentServer.id) { gAccess = true; if (guild.userPermission == 'owner' || guild.userPermission == 'MANAGE_GUILD' || currentServer.staff.includes(currentUser.userId)) { @@ -41,4 +41,4 @@ module.exports = { res.status(500).json({ error: "some error happened", info: "report this if it happenes again." + domain + '/er' }); } } -} \ No newline at end of file +}