mirror of
https://git.waldn.net/git/knotteye/satyr.git
synced 2025-09-16 02:24:58 +00:00
Fix handling of usernames with capital letters in the web page.
Add updating and backup/restore instructions.
This commit is contained in:
@ -52,9 +52,9 @@ async function init(satyr: any, port: number, ircconf: any){
|
||||
});
|
||||
});
|
||||
app.get('/users/*', (req, res) => {
|
||||
njkconf.user = req.url.split('/')[2].toLowerCase();
|
||||
db.query('select title,about from user_meta where username='+db.raw.escape(njkconf.user)).then((result) => {
|
||||
db.query('select username,title,about from user_meta where username='+db.raw.escape(req.url.split('/')[2].toLowerCase())).then((result) => {
|
||||
if(result[0]){
|
||||
njkconf.user = result[0].username;
|
||||
njkconf.streamtitle = result[0].title;
|
||||
njkconf.about = result[0].about;
|
||||
res.render('user.njk', njkconf);
|
||||
|
Reference in New Issue
Block a user