mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Extract actions on deletereleasebyid from models to release service (#8219)
* extract actions on deletereleasebyid from models to release service * fix tests
This commit is contained in:
		@@ -255,3 +255,9 @@ func updateAttachment(e Engine, atta *Attachment) error {
 | 
			
		||||
	_, err := sess.Cols("name", "issue_id", "release_id", "comment_id", "download_count").Update(atta)
 | 
			
		||||
	return err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// DeleteAttachmentsByRelease deletes all attachments associated with the given release.
 | 
			
		||||
func DeleteAttachmentsByRelease(releaseID int64) error {
 | 
			
		||||
	_, err := x.Where("release_id = ?", releaseID).Delete(&Attachment{})
 | 
			
		||||
	return err
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user