also save hidemail

This commit is contained in:
b1ek 2023-02-27 11:17:40 +10:00
parent 7f5b7c49dc
commit 8b66513869
Signed by: blek
GPG Key ID: 14546221E3595D0C
2 changed files with 5 additions and 3 deletions

View File

@ -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'},
]
}]

View File

@ -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):