实现访问博客计数
This commit is contained in:
@@ -39,4 +39,8 @@ export class BlogService {
|
||||
async findById(id: string) {
|
||||
return this.blogRepository.findOneBy({ id });
|
||||
}
|
||||
|
||||
async incrementViewCount(id: string) {
|
||||
await this.blogRepository.increment({ id }, 'viewCount', 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user