diff --git a/src/express/post/api/updatereactionroles.js b/src/express/post/api/updatereactionroles.js index 377fd0e..2453821 100644 --- a/src/express/post/api/updatereactionroles.js +++ b/src/express/post/api/updatereactionroles.js @@ -13,7 +13,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)) { @@ -84,4 +84,4 @@ module.exports = { res.status(500).json({ error: "some error happened", info: "report this if it happenes again." + conf.domain + '/er' }); } } -} \ No newline at end of file +}