0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Passed post id to comments helper instead of comment id

refs https://github.com/TryGhost/Team/issues/1664
This commit is contained in:
Simon Backx 2022-07-05 15:12:47 +02:00 committed by Simon Backx
parent 87f714ef25
commit 7d22384d7f

View file

@ -2,6 +2,7 @@ const {SafeString} = require('../services/handlebars');
const {config, urlUtils, getFrontendKey, labs} = require('../services/proxy');
async function comments() {
// todo: For now check on the comment id to exclude normal pages (we probably have a better way to do this)
const commentId = this.comment_id;
if (!commentId) {
@ -14,7 +15,7 @@ async function comments() {
'ghost-comments': urlUtils.getSiteUrl(),
api: urlUtils.urlFor('api', {type: 'content'}, true),
key: frontendKey,
'comment-id': commentId,
'post-id': this.id,
'sentry-dsn': '' /* todo: insert sentry dsn key here */
};