diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-05-21 20:48:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-21 20:48:28 +0800 |
commit | 64f6a5d113da0d5d187752c9398d6e8d22d24b79 (patch) | |
tree | f72aea0c5c32d6ee4df1c973eaf67f1058f0f1a1 /models/issues/comment_code.go | |
parent | edd8ea0b0d07f7fee0f8cf506975c8f3bec690ca (diff) | |
download | gitea-64f6a5d113da0d5d187752c9398d6e8d22d24b79.tar.gz gitea-64f6a5d113da0d5d187752c9398d6e8d22d24b79.zip |
Use `CommentList` instead of `[]*Comment` (#24828)
As title.
Diffstat (limited to 'models/issues/comment_code.go')
-rw-r--r-- | models/issues/comment_code.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/issues/comment_code.go b/models/issues/comment_code.go index 8475da1a8c..304ac4569f 100644 --- a/models/issues/comment_code.go +++ b/models/issues/comment_code.go @@ -48,7 +48,7 @@ func fetchCodeCommentsByReview(ctx context.Context, issue *Issue, currentUser *u } func findCodeComments(ctx context.Context, opts FindCommentsOptions, issue *Issue, currentUser *user_model.User, review *Review) ([]*Comment, error) { - var comments []*Comment + var comments CommentList if review == nil { review = &Review{ID: 0} } @@ -68,7 +68,7 @@ func findCodeComments(ctx context.Context, opts FindCommentsOptions, issue *Issu return nil, err } - if err := CommentList(comments).LoadPosters(ctx); err != nil { + if err := comments.LoadPosters(ctx); err != nil { return nil, err } |