From ea6b33e11eaf391a7a9e9e43f96dfbd7ca0b760f Mon Sep 17 00:00:00 2001 From: xtian7489 Date: Wed, 28 Feb 2024 11:55:30 -0300 Subject: [PATCH] add participatedInAssembly to user populate in comment --- helpers/projectsHelper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers/projectsHelper.js b/helpers/projectsHelper.js index 906b1dc..fbc9e08 100644 --- a/helpers/projectsHelper.js +++ b/helpers/projectsHelper.js @@ -343,7 +343,7 @@ exports.listComments = async (projectId, articleId = null, version = null, curre // }).sort({createdAt: -1}).skip((page - 1) * limit).limit(limit); const commentsArr = await Comment.find(query).populate({ path: 'user', - select: '_id name country', + select: '_id name country participatedInAssembly', populate: { path: 'country', select: '_id name code emoji unicode image' @@ -401,7 +401,7 @@ exports.listReplies = async (commentId, currentUserId = null, page = 1, limit = const query = { comment: commentId } const repliesArr = await Reply.find(query).populate({ path: 'user', - select: '_id name country', + select: '_id name country participatedInAssembly', populate: { path: 'country', select: '_id name code emoji unicode image'