mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Move init repository related functions to modules (#19159)
* Move init repository related functions to modules * Fix lint * Use ctx but db.DefaultContext Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		@@ -99,7 +99,7 @@ func CreateLabel(ctx *context.APIContext) {
 | 
			
		||||
		OrgID:       ctx.Org.Organization.ID,
 | 
			
		||||
		Description: form.Description,
 | 
			
		||||
	}
 | 
			
		||||
	if err := models.NewLabel(label); err != nil {
 | 
			
		||||
	if err := models.NewLabel(ctx, label); err != nil {
 | 
			
		||||
		ctx.Error(http.StatusInternalServerError, "NewLabel", err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user