diff options
Diffstat (limited to 'routers/api/v1/repo/issue_label.go')
-rw-r--r-- | routers/api/v1/repo/issue_label.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/routers/api/v1/repo/issue_label.go b/routers/api/v1/repo/issue_label.go index b471d4a08d..f1eed2112a 100644 --- a/routers/api/v1/repo/issue_label.go +++ b/routers/api/v1/repo/issue_label.go @@ -9,7 +9,6 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/routers/api/v1/convert" ) func ListIssueLabels(ctx *context.APIContext) { @@ -25,7 +24,7 @@ func ListIssueLabels(ctx *context.APIContext) { apiLabels := make([]*api.Label, len(issue.Labels)) for i := range issue.Labels { - apiLabels[i] = convert.ToLabel(issue.Labels[i]) + apiLabels[i] = issue.Labels[i].APIFormat() } ctx.JSON(200, &apiLabels) } @@ -65,7 +64,7 @@ func AddIssueLabels(ctx *context.APIContext, form api.IssueLabelsOption) { apiLabels := make([]*api.Label, len(labels)) for i := range labels { - apiLabels[i] = convert.ToLabel(labels[i]) + apiLabels[i] = issue.Labels[i].APIFormat() } ctx.JSON(200, &apiLabels) } @@ -139,7 +138,7 @@ func ReplaceIssueLabels(ctx *context.APIContext, form api.IssueLabelsOption) { apiLabels := make([]*api.Label, len(labels)) for i := range labels { - apiLabels[i] = convert.ToLabel(labels[i]) + apiLabels[i] = issue.Labels[i].APIFormat() } ctx.JSON(200, &apiLabels) } |