probably a fix
This commit is contained in:
parent
1172b86659
commit
c571312917
2 changed files with 2 additions and 5 deletions
|
@ -28,7 +28,6 @@ router.post('/:site/*', utils.limiter(20), (req, res) => {
|
|||
message: utils.escapeHtml(req.body.message),
|
||||
reply_to: req.body.reply_to || null,
|
||||
};
|
||||
console.log(comment);
|
||||
|
||||
// validation
|
||||
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) {
|
||||
res.status(400).json("הודעה ארוכה מדי.");
|
||||
} else {
|
||||
const comment = db.insertPageComment(site_url, path, comment);
|
||||
|
||||
res.json(comment);
|
||||
res.json(db.insertPageComment(site_url, path, comment));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ export class DB {
|
|||
return getPageComments(this.my_db, site_url, page);
|
||||
}
|
||||
insertPageComment(site_url, path, comment) {
|
||||
insertPageComment(this.my_db, site_url, path, comment);
|
||||
return insertPageComment(this.my_db, site_url, path, comment);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue