Add sections in profile.njk for adjusting settings.

Everything tested and working apart from the actual streaming functionality.
This commit is contained in:
knotteye
2020-10-12 13:34:24 -05:00
parent d4bb2ceebe
commit 93738d27bc
2 changed files with 6 additions and 2 deletions

View File

@@ -496,7 +496,9 @@ async function initSite(openReg) {
if(tryDecode(req.cookies.Authorization)) {
db.query('select * from user_meta where username='+db.raw.escape(JWT.decode(req.cookies.Authorization)['username'])).then((result) => {
db.query('select record_flag from users where username='+db.raw.escape(JWT.decode(req.cookies.Authorization)['username'])).then((r2) => {
res.render('profile.njk', Object.assign({rflag: r2[0]}, {meta: result[0]}, {auth: {is: true, name: JWT.decode(req.cookies.Authorization)['username']}}, njkconf));
db.query('select enabled from twitch_mirror where username='+db.raw.escape(JWT.decode(req.cookies.Authorization)['username'])).then((r3) => {
res.render('profile.njk', Object.assign({twitch: r3[0]}, {rflag: r2[0]}, {meta: result[0]}, {auth: {is: true, name: JWT.decode(req.cookies.Authorization)['username']}}, njkconf));
});
});
});
//res.render('profile.njk', Object.assign({auth: {is: true, name: JWT.decode(req.cookies.Authorization)['username']}}, njkconf));