From 1a99cf6fb520710f15a3023a6a6c4da47f56ad12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Fri, 29 Dec 2023 16:38:30 -0500 Subject: [PATCH] refactor(api/utils): populate coAuthor in helpers --- lib/server/dbHelpers/listQuerier.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/server/dbHelpers/listQuerier.ts b/lib/server/dbHelpers/listQuerier.ts index 76c06bb..811f133 100644 --- a/lib/server/dbHelpers/listQuerier.ts +++ b/lib/server/dbHelpers/listQuerier.ts @@ -31,10 +31,10 @@ export default async function ( path: "ficmas", populate: { path: "wisher", model: "User", select: "username _id" }, }) - .populate("coAuthor", "username _id") + .populate("coAuthor", "username _id profile") .populate("chapters.bands") .populate({ path: "challenge", model: Challenge }) - .populate("author", "username _id") + .populate("author", "username _id profile") .exec(); let oro = stories.filter((a) => a.author != null); log.debug(JSON.stringify(query), { label: "list query" });