mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-18 15:08:20 +00:00
fix: pass all other requests to file search
This commit is contained in:
parent
6ea6895a36
commit
9bfc74833a
|
@ -413,8 +413,7 @@ func DownloadPackageFile(ctx *context.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.XML(http.StatusOK, nuget_module.GenerateNuspec(pkg))
|
ctx.XML(http.StatusOK, nuget_module.GenerateNuspec(pkg))
|
||||||
} else if filename == fmt.Sprintf("%s.%s.nupkg", packageName, packageVersion) {
|
} else {
|
||||||
|
|
||||||
s, u, pf, err := packages_service.GetFileStreamByPackageNameAndVersion(
|
s, u, pf, err := packages_service.GetFileStreamByPackageNameAndVersion(
|
||||||
ctx,
|
ctx,
|
||||||
&packages_service.PackageInfo{
|
&packages_service.PackageInfo{
|
||||||
|
@ -437,8 +436,6 @@ func DownloadPackageFile(ctx *context.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
helper.ServePackageFile(ctx, s, u, pf)
|
helper.ServePackageFile(ctx, s, u, pf)
|
||||||
} else {
|
|
||||||
apiError(ctx, http.StatusInternalServerError, "Invalid filename")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue