fix: 后端添加博客列表遗漏的描述字段

This commit is contained in:
2025-12-19 21:09:55 +08:00
parent b0502d4d46
commit 34e01b0eb8

View File

@@ -13,7 +13,7 @@ export class BlogService {
private readonly blogRepository: Repository<Blog>, private readonly blogRepository: Repository<Blog>,
@InjectRepository(BlogComment) @InjectRepository(BlogComment)
private readonly blogCommentRepository: Repository<BlogComment>, private readonly blogCommentRepository: Repository<BlogComment>,
) {} ) { }
async list( async list(
option: { option: {
@@ -35,13 +35,14 @@ export class BlogService {
return i; return i;
} }
const { createdAt, deletedAt, id, title, viewCount } = i; const { createdAt, deletedAt, id, title, viewCount, description } = i;
return { return {
createdAt, createdAt,
deletedAt, deletedAt,
id, id,
title, title,
viewCount, viewCount,
description,
}; };
}); });
} }