From 86a225f45438757de48c64417f415e870135b601 Mon Sep 17 00:00:00 2001 From: 404invalid-user Date: Mon, 30 Aug 2021 13:37:15 +0100 Subject: [PATCH] Update updateoverview.js --- src/express/post/api/updateoverview.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/express/post/api/updateoverview.js b/src/express/post/api/updateoverview.js index efe424d..326e59a 100644 --- a/src/express/post/api/updateoverview.js +++ b/src/express/post/api/updateoverview.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", message: "that server id cant be found" }); 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)) { @@ -48,4 +48,4 @@ module.exports = { } } -} \ No newline at end of file +}