Skip to content

Commit 849fd4a

Browse files
fix: service 接口bug修复
1 parent a6218d2 commit 849fd4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

service/app/controller/blog/comment.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class CommentController extends controller {
143143
(result) => result.id === id
144144
);
145145
let commentLike = [];
146-
if (commentList.length > 1) {
146+
if (commentList.length > 0) {
147147
commentLike = commentList.map((item) => ({
148148
id: item.likeId,
149149
visitorId: item.likeVisitorId,
@@ -226,7 +226,7 @@ class CommentController extends controller {
226226
const result = commentIds.map((id) => {
227227
const commentList = selectResults.filter((result) => result.id === id);
228228
let commentLike = [];
229-
if (commentList.length > 1) {
229+
if (commentList.length > 0) {
230230
commentLike = commentList.map((item) => ({
231231
id: item.likeId,
232232
visitorId: item.likeVisitorId,

0 commit comments

Comments
 (0)