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:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user