refactor(api/utils): populate coAuthor in helpers

This commit is contained in:
parent 576684e364
commit 1a99cf6fb5
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

@ -31,10 +31,10 @@ export default async function (
path: "ficmas", path: "ficmas",
populate: { path: "wisher", model: "User", select: "username _id" }, populate: { path: "wisher", model: "User", select: "username _id" },
}) })
.populate("coAuthor", "username _id") .populate("coAuthor", "username _id profile")
.populate("chapters.bands") .populate("chapters.bands")
.populate({ path: "challenge", model: Challenge }) .populate({ path: "challenge", model: Challenge })
.populate("author", "username _id") .populate("author", "username _id profile")
.exec(); .exec();
let oro = stories.filter((a) => a.author != null); let oro = stories.filter((a) => a.author != null);
log.debug(JSON.stringify(query), { label: "list query" }); log.debug(JSON.stringify(query), { label: "list query" });