bugfixing

This commit is contained in:
MuslemRahimi 2024-06-03 14:05:34 +02:00
parent cf6634fbbe
commit 37c7dc02bc

View File

@ -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);