homepage.js/routes/guestbook.js

19 lines
410 B
JavaScript
Raw Normal View History

2023-02-19 06:30:02 +01:00
const Helpers = require('../helpers');
async function handler(req, res) {
res.send(await Helpers.ViewLoader.load('guestbook.pug', {
current_route: req.originalUrl,
ip: req.ip
}));
return;
}
2023-02-19 07:05:36 +01:00
async function submit(req, res) {
res.send(req.body);
return;
}
2023-02-19 06:30:02 +01:00
module.exports = (router) => {
router.get('/guestbook', handler);
2023-02-19 07:05:36 +01:00
router.post('/guestbook/submit', submit);
2023-02-19 06:30:02 +01:00
}