Updated user profile

This commit is contained in:
CorwinDev committed 2022-08-17 14:57:28 +02:00
1 parent d0a969f145
commit e9e6b4945e
13 files changed
+328 -26

No files matched your search

+3 -4
View File
@@ -388,7 +388,7 @@ router.get('/:botID/analytics', async function (req, res) {
req.session.backURL = req.originalUrl;
return res.redirect('/auth');
} else {
bots.findOne({ id: req.params.botID }, async function (err, bot) {
servers.findOne({ id: req.params.botID }, async function (err, bot) {
if (err) {
console.log(err);
return res.redirect('/');
@@ -397,10 +397,9 @@ router.get('/:botID/analytics', async function (req, res) {
req.session.error = "No bot found";
return res.redirect('/');
}
res.render('bot/analytics', {
res.render('server/analytics', {
bot: bot,
user: req.user,
bota: await global.bsl.users.fetch(bot.id)
user: req.user
});
});