diff --git a/routes/guestbook.js b/routes/guestbook.js index 9b26394..9d6c828 100644 --- a/routes/guestbook.js +++ b/routes/guestbook.js @@ -29,7 +29,8 @@ async function handler(req, res, next) { data, errors, name: req.session.gb_name, - email: req.session.gb_email + email: req.session.gb_email, + hidemail: req.session.gb_hidemail })); return; } catch (err) { @@ -68,6 +69,7 @@ async function submit(req, res, next) { req.session.gb_name = name; req.session.gb_email = email; + req.session.gb_hidemail = req.body.hidemail; // actual shit let records = await Sequelize.Guestbook.findAll({ @@ -148,7 +150,7 @@ async function rss(req, res) { { channel: [ {title: 'Guestbook'}, - {link: 'http://blek.codes/guestbook'}, + {link: req.protocol + '://' + req.get('host') + '/guestbook'}, {description: 'Alice\'s guestbook'}, ] }] diff --git a/view/guestbook.pug b/view/guestbook.pug index 999b21c..e28206b 100644 --- a/view/guestbook.pug +++ b/view/guestbook.pug @@ -29,7 +29,7 @@ block content tr td Hide your email? td - input(type='checkbox' name='hidemail') + input(type='checkbox' name='hidemail' checked=hidemail) // span(style='font-size:9pt;color:red;user-select:none' title='required') * p(style='margin:6px 0') | Your message (512 chars max):