also save hidemail
This commit is contained in:
parent
7f5b7c49dc
commit
8b66513869
|
@ -29,7 +29,8 @@ async function handler(req, res, next) {
|
||||||
data,
|
data,
|
||||||
errors,
|
errors,
|
||||||
name: req.session.gb_name,
|
name: req.session.gb_name,
|
||||||
email: req.session.gb_email
|
email: req.session.gb_email,
|
||||||
|
hidemail: req.session.gb_hidemail
|
||||||
}));
|
}));
|
||||||
return;
|
return;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -68,6 +69,7 @@ async function submit(req, res, next) {
|
||||||
|
|
||||||
req.session.gb_name = name;
|
req.session.gb_name = name;
|
||||||
req.session.gb_email = email;
|
req.session.gb_email = email;
|
||||||
|
req.session.gb_hidemail = req.body.hidemail;
|
||||||
|
|
||||||
// actual shit
|
// actual shit
|
||||||
let records = await Sequelize.Guestbook.findAll({
|
let records = await Sequelize.Guestbook.findAll({
|
||||||
|
@ -148,7 +150,7 @@ async function rss(req, res) {
|
||||||
{
|
{
|
||||||
channel: [
|
channel: [
|
||||||
{title: 'Guestbook'},
|
{title: 'Guestbook'},
|
||||||
{link: 'http://blek.codes/guestbook'},
|
{link: req.protocol + '://' + req.get('host') + '/guestbook'},
|
||||||
{description: 'Alice\'s guestbook'},
|
{description: 'Alice\'s guestbook'},
|
||||||
]
|
]
|
||||||
}]
|
}]
|
||||||
|
|
|
@ -29,7 +29,7 @@ block content
|
||||||
tr
|
tr
|
||||||
td Hide your email?
|
td Hide your email?
|
||||||
td
|
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') *
|
// span(style='font-size:9pt;color:red;user-select:none' title='required') *
|
||||||
p(style='margin:6px 0')
|
p(style='margin:6px 0')
|
||||||
| Your message (512 chars max):
|
| Your message (512 chars max):
|
||||||
|
|
Loading…
Reference in New Issue