include author's type

master
rob 2 years ago
parent 06924946bd
commit c9a36c532e

@ -207,6 +207,9 @@ class PostService extends SiteService {
.limit(pagination.cpp)
.populate(this.populatePost)
.lean();
posts.forEach((post) => {
post.author.type = post.authorType;
});
return posts;
}
@ -244,6 +247,9 @@ class PostService extends SiteService {
}
const posts = await q.lean();
posts.forEach((post) => {
post.author.type = post.authorType;
});
return posts;
}
@ -286,6 +292,9 @@ class PostService extends SiteService {
.select('+content')
.populate(this.populatePost)
.lean();
post.author.type = post.authorType;
return post;
}

Loading…
Cancel
Save