diff options
Diffstat (limited to 'routers/web')
-rw-r--r-- | routers/web/repo/issue.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index 317f762fb1..31bcbd7c21 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -2058,7 +2058,7 @@ func GetIssueInfo(ctx *context.Context) { } } - ctx.JSON(http.StatusOK, convert.ToAPIIssue(ctx, issue)) + ctx.JSON(http.StatusOK, convert.ToIssue(ctx, issue)) } // UpdateIssueTitle change issue's title @@ -2563,7 +2563,7 @@ func SearchIssues(ctx *context.Context) { } ctx.SetTotalCountHeader(filteredCount) - ctx.JSON(http.StatusOK, convert.ToAPIIssueList(ctx, issues)) + ctx.JSON(http.StatusOK, convert.ToIssueList(ctx, issues)) } func getUserIDForFilter(ctx *context.Context, queryName string) int64 { @@ -2724,7 +2724,7 @@ func ListIssues(ctx *context.Context) { } ctx.SetTotalCountHeader(filteredCount) - ctx.JSON(http.StatusOK, convert.ToAPIIssueList(ctx, issues)) + ctx.JSON(http.StatusOK, convert.ToIssueList(ctx, issues)) } func BatchDeleteIssues(ctx *context.Context) { @@ -3290,7 +3290,7 @@ func GetIssueAttachments(ctx *context.Context) { } attachments := make([]*api.Attachment, len(issue.Attachments)) for i := 0; i < len(issue.Attachments); i++ { - attachments[i] = convert.ToAttachment(issue.Attachments[i]) + attachments[i] = convert.ToAttachment(ctx.Repo.Repository, issue.Attachments[i]) } ctx.JSON(http.StatusOK, attachments) } @@ -3314,7 +3314,7 @@ func GetCommentAttachments(ctx *context.Context) { return } for i := 0; i < len(comment.Attachments); i++ { - attachments = append(attachments, convert.ToAttachment(comment.Attachments[i])) + attachments = append(attachments, convert.ToAttachment(ctx.Repo.Repository, comment.Attachments[i])) } ctx.JSON(http.StatusOK, attachments) } |