aboutsummaryrefslogtreecommitdiff
path: root/routers/api/v1/repo/issue_label.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-14 04:17:26 -0700
committerUnknwon <u@gogs.io>2016-08-14 04:17:26 -0700
commitdccb0c15b996ac4dc0307cbfed140ce1558d7e3c (patch)
tree97593eae3a1023296c2c03258e6bc4ae4c02b6bf /routers/api/v1/repo/issue_label.go
parent3f7f4852efaaa56a0dada832dc652a1fc8869ae7 (diff)
Replace convert.To with APIFormat calls
Diffstat (limited to 'routers/api/v1/repo/issue_label.go')
-rw-r--r--routers/api/v1/repo/issue_label.go7
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 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)
}