Fix bug in issue labels API (#2048)
This commit is contained in:
parent
bf187304dc
commit
3ffedeab03
3 changed files with 69 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue