update: the blog comment logic for admin
This commit is contained in:
@@ -4,6 +4,7 @@ import { Not } from "typeorm";
|
||||
import { BlogMessage, CommonMessage } from "../../../common/enums/message.enum";
|
||||
import { CategoryListSearchQueryDto } from "../../danak-services/DTO/category-search-query.dto";
|
||||
import { UsersService } from "../../users/providers/users.service";
|
||||
import { BlogCommentQueryDto } from "../DTO/blog-comment-query.dto";
|
||||
import { CreateBlogDto } from "../DTO/create-blog.dto";
|
||||
import { CreateBlogCategoryDto } from "../DTO/create-category.dto";
|
||||
import { CreateCommentDto } from "../DTO/create-comment.dto";
|
||||
@@ -260,6 +261,13 @@ export class BlogsService {
|
||||
return { comments };
|
||||
}
|
||||
|
||||
//*********************************** */
|
||||
|
||||
async getAllCommentForAdmin(queryDto: BlogCommentQueryDto) {
|
||||
const [comments, count] = await this.blogCommentsRepository.getAllCommentsForAdmin(queryDto);
|
||||
return { comments, count, paginate: true };
|
||||
}
|
||||
|
||||
//*********************************** */
|
||||
private generateSlug(slug: string): string {
|
||||
if (!slug) return "";
|
||||
|
||||
Reference in New Issue
Block a user