From 37c7dc02bc256361fdd229893ba0ca994cf53c60 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Mon, 3 Jun 2024 14:05:34 +0200 Subject: [PATCH] bugfixing --- fastify/upvote-comment/server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fastify/upvote-comment/server.js b/fastify/upvote-comment/server.js index 54fdab1..a3448da 100755 --- a/fastify/upvote-comment/server.js +++ b/fastify/upvote-comment/server.js @@ -7,10 +7,10 @@ module.exports = function (fastify, opts, done) { const data = request.body; const commentId = data?.commentId; + const postId = data?.postId; const userId = data?.userId; let output = 'failure'; - console.log(data) try { @@ -47,6 +47,7 @@ module.exports = function (fastify, opts, done) { formDataNotifications.append('opUser', opPost.user); formDataNotifications.append('user', userId) formDataNotifications.append('comment', commentId); + formDataNotifications.append('post', postId); formDataNotifications.append('notifyType', 'vote'); await pb.collection('notifications').create(formDataNotifications);