mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
* revert #2001 and fix issue comments hidden * fix #2001 * fix import * improve comment type * reduce unnecessary join * fix comment on FindCommentsOptions
This commit is contained in:
@@ -27,7 +27,11 @@ func ListIssueComments(ctx *context.APIContext) {
|
||||
return
|
||||
}
|
||||
|
||||
comments, err := models.GetCommentsByIssueIDSince(issue.ID, since.Unix())
|
||||
comments, err := models.FindComments(models.FindCommentsOptions{
|
||||
IssueID: issue.ID,
|
||||
Since: since.Unix(),
|
||||
Type: models.CommentTypeComment,
|
||||
})
|
||||
if err != nil {
|
||||
ctx.Error(500, "GetCommentsByIssueIDSince", err)
|
||||
return
|
||||
@@ -47,7 +51,11 @@ func ListRepoIssueComments(ctx *context.APIContext) {
|
||||
since, _ = time.Parse(time.RFC3339, ctx.Query("since"))
|
||||
}
|
||||
|
||||
comments, err := models.GetCommentsByRepoIDSince(ctx.Repo.Repository.ID, since.Unix())
|
||||
comments, err := models.FindComments(models.FindCommentsOptions{
|
||||
RepoID: ctx.Repo.Repository.ID,
|
||||
Since: since.Unix(),
|
||||
Type: models.CommentTypeComment,
|
||||
})
|
||||
if err != nil {
|
||||
ctx.Error(500, "GetCommentsByRepoIDSince", err)
|
||||
return
|
||||
|
Reference in New Issue
Block a user