mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 00:20:25 +08: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