mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Refactor names (#31405)
This PR only does "renaming": * `Route` should be `Router` (and chi router is also called "router") * `Params` should be `PathParam` (to distingush it from URL query param, and to match `FormString`) * Use lower case for private functions to avoid exposing or abusing
This commit is contained in:
		@@ -101,14 +101,14 @@ func Index(ctx *context.Context) {
 | 
			
		||||
 | 
			
		||||
// DownloadPackageFile serves the content of a package
 | 
			
		||||
func DownloadPackageFile(ctx *context.Context) {
 | 
			
		||||
	filename := ctx.Params("filename")
 | 
			
		||||
	filename := ctx.PathParam("filename")
 | 
			
		||||
 | 
			
		||||
	pvs, _, err := packages_model.SearchVersions(ctx, &packages_model.PackageSearchOptions{
 | 
			
		||||
		OwnerID: ctx.Package.Owner.ID,
 | 
			
		||||
		Type:    packages_model.TypeHelm,
 | 
			
		||||
		Name: packages_model.SearchValue{
 | 
			
		||||
			ExactMatch: true,
 | 
			
		||||
			Value:      ctx.Params("package"),
 | 
			
		||||
			Value:      ctx.PathParam("package"),
 | 
			
		||||
		},
 | 
			
		||||
		HasFileWithName: filename,
 | 
			
		||||
		IsInternal:      optional.Some(false),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user