🥺
This commit is contained in:
parent
4cfabd7663
commit
5ee052bd93
1 changed files with 2 additions and 1 deletions
3
index.js
3
index.js
|
@ -79,7 +79,8 @@ server.all('/comment', function get(req, res) {
|
|||
function recurse(post) {
|
||||
console.log(String(cid) + ' ' + comment)
|
||||
if(String(cid) === comment) {
|
||||
if(req.body.name && req.body.title && req.body.content) {
|
||||
if(req.body.name && req.body.content) {
|
||||
if(!req.body.title) req.body.title = '';
|
||||
let p = {timestamp: new Date().getTime(), author: req.body.name, title: req.body.title, content: req.body.content.replaceAll('\r\n', '\n'), comments: []}
|
||||
post.comments.push(p)
|
||||
if(fake) {
|
||||
|
|
Loading…
Reference in a new issue