From dccb0c15b996ac4dc0307cbfed140ce1558d7e3c Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 14 Aug 2016 04:17:26 -0700 Subject: Replace convert.To with APIFormat calls --- routers/api/v1/repo/issue_label.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'routers/api/v1/repo/issue_label.go') diff --git a/routers/api/v1/repo/issue_label.go b/routers/api/v1/repo/issue_label.go index b471d4a0..f1eed211 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) } -- cgit v1.2.3