mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-03 08:02:36 +09:00 
			
		
		
		
	Refactor packages (func name & UI) (#34773)
1. Use `OpenXxx` instead of `GetXxx` because the returned readers should be correctly closed, and clarify the behaviors of the functions: they increase the download counter 2. Use `packages-content` styles instead of `issue-content`
This commit is contained in:
		@@ -85,7 +85,7 @@ func DownloadPackageFile(ctx *context.Context) {
 | 
			
		||||
	packageVersion := ctx.PathParam("version")
 | 
			
		||||
	filename := ctx.PathParam("filename")
 | 
			
		||||
 | 
			
		||||
	s, u, pf, err := packages_service.GetFileStreamByPackageNameAndVersion(
 | 
			
		||||
	s, u, pf, err := packages_service.OpenFileForDownloadByPackageNameAndVersion(
 | 
			
		||||
		ctx,
 | 
			
		||||
		&packages_service.PackageInfo{
 | 
			
		||||
			Owner:       ctx.Package.Owner,
 | 
			
		||||
@@ -132,7 +132,7 @@ func DownloadPackageFileByName(ctx *context.Context) {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	s, u, pf, err := packages_service.GetFileStreamByPackageVersion(
 | 
			
		||||
	s, u, pf, err := packages_service.OpenFileForDownloadByPackageVersion(
 | 
			
		||||
		ctx,
 | 
			
		||||
		pvs[0],
 | 
			
		||||
		&packages_service.PackageFileInfo{
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user