probably a fix

This commit is contained in:
me 2025-03-15 12:15:10 +02:00
parent 1172b86659
commit c571312917
2 changed files with 2 additions and 5 deletions

View File

@ -28,7 +28,6 @@ router.post('/:site/*', utils.limiter(20), (req, res) => {
message: utils.escapeHtml(req.body.message), message: utils.escapeHtml(req.body.message),
reply_to: req.body.reply_to || null, reply_to: req.body.reply_to || null,
}; };
console.log(comment);
// validation // validation
const user_token = req.body.token; const user_token = req.body.token;
@ -43,9 +42,7 @@ router.post('/:site/*', utils.limiter(20), (req, res) => {
} else if (comment.message > site.max_lengths.message) { } else if (comment.message > site.max_lengths.message) {
res.status(400).json("הודעה ארוכה מדי."); res.status(400).json("הודעה ארוכה מדי.");
} else { } else {
const comment = db.insertPageComment(site_url, path, comment); res.json(db.insertPageComment(site_url, path, comment));
res.json(comment);
} }
}); });

View File

@ -20,7 +20,7 @@ export class DB {
return getPageComments(this.my_db, site_url, page); return getPageComments(this.my_db, site_url, page);
} }
insertPageComment(site_url, path, comment) { insertPageComment(site_url, path, comment) {
insertPageComment(this.my_db, site_url, path, comment); return insertPageComment(this.my_db, site_url, path, comment);
} }
} }