1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Fix bug in issue labels API (#2048)

This commit is contained in:
Ethan Koenig
2017-06-24 19:52:51 -04:00
committed by Lunny Xiao
parent bf187304dc
commit 3ffedeab03
3 changed files with 69 additions and 3 deletions

View File

@@ -66,7 +66,7 @@ func AddIssueLabels(ctx *context.APIContext, form api.IssueLabelsOption) {
apiLabels := make([]*api.Label, len(labels))
for i := range labels {
apiLabels[i] = issue.Labels[i].APIFormat()
apiLabels[i] = labels[i].APIFormat()
}
ctx.JSON(200, &apiLabels)
}
@@ -142,7 +142,7 @@ func ReplaceIssueLabels(ctx *context.APIContext, form api.IssueLabelsOption) {
apiLabels := make([]*api.Label, len(labels))
for i := range labels {
apiLabels[i] = issue.Labels[i].APIFormat()
apiLabels[i] = labels[i].APIFormat()
}
ctx.JSON(200, &apiLabels)
}