bugfixing
This commit is contained in:
parent
cf6634fbbe
commit
37c7dc02bc
@ -7,10 +7,10 @@ module.exports = function (fastify, opts, done) {
|
|||||||
const data = request.body;
|
const data = request.body;
|
||||||
|
|
||||||
const commentId = data?.commentId;
|
const commentId = data?.commentId;
|
||||||
|
const postId = data?.postId;
|
||||||
const userId = data?.userId;
|
const userId = data?.userId;
|
||||||
|
|
||||||
let output = 'failure';
|
let output = 'failure';
|
||||||
console.log(data)
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
@ -47,6 +47,7 @@ module.exports = function (fastify, opts, done) {
|
|||||||
formDataNotifications.append('opUser', opPost.user);
|
formDataNotifications.append('opUser', opPost.user);
|
||||||
formDataNotifications.append('user', userId)
|
formDataNotifications.append('user', userId)
|
||||||
formDataNotifications.append('comment', commentId);
|
formDataNotifications.append('comment', commentId);
|
||||||
|
formDataNotifications.append('post', postId);
|
||||||
formDataNotifications.append('notifyType', 'vote');
|
formDataNotifications.append('notifyType', 'vote');
|
||||||
|
|
||||||
await pb.collection('notifications').create(formDataNotifications);
|
await pb.collection('notifications').create(formDataNotifications);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user