From 1bae803ff4a5e81e9c3802acb35a6865f518b6de Mon Sep 17 00:00:00 2001 From: masterhc Date: Sun, 7 Jul 2024 18:06:27 +0100 Subject: [PATCH] guild settings update no userid fix --- controller/api.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controller/api.js b/controller/api.js index b94c3b3..b90bd2b 100644 --- a/controller/api.js +++ b/controller/api.js @@ -81,8 +81,9 @@ exports.guildUpdate = (bot)=> var aux = {} aux[req.params.setting] = !original[req.params.setting] const updated = await GuildM.findOneAndUpdate({gID:req.params.id}, aux) + const userid = await new DiscordAPI(req.headers.cookie, bot).getUserId(); const guild = await new DiscordAPI(req.headers.cookie, bot).getSpecificGuildDataForDash(req.params.id); - res.render('guildPopup.ejs', {guild}) + res.render('guildPopup.ejs', {guild,userid}) } }