update: add blog comment to the blog fetch by id
This commit is contained in:
@@ -150,7 +150,8 @@ export class BlogsService {
|
||||
|
||||
async getBlogById(id: string) {
|
||||
const blog = await this.findBlogById(id);
|
||||
return { blog };
|
||||
const comments = await this.blogCommentsRepository.findBlogCommentsByBlogId(id);
|
||||
return { blog, comments };
|
||||
}
|
||||
//*********************************** */
|
||||
|
||||
@@ -208,8 +209,8 @@ export class BlogsService {
|
||||
}
|
||||
//*********************************** */
|
||||
|
||||
async getBlogComments(blogId: string) {
|
||||
const comments = await this.blogCommentsRepository.findAllByBlogId(blogId);
|
||||
async getBlogCommentsForAdmin(blogId: string) {
|
||||
const comments = await this.blogCommentsRepository.findBlogCommentsForAdmin(blogId);
|
||||
return { comments };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user