fix: pass all other requests to file search

This commit is contained in:
Michael Kriese 2024-01-24 00:13:47 +01:00
parent 6ea6895a36
commit 9bfc74833a
No known key found for this signature in database
GPG key ID: B83F553A0724D44E

View file

@ -413,8 +413,7 @@ func DownloadPackageFile(ctx *context.Context) {
}
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(
ctx,
&packages_service.PackageInfo{
@ -437,8 +436,6 @@ func DownloadPackageFile(ctx *context.Context) {
}
helper.ServePackageFile(ctx, s, u, pf)
} else {
apiError(ctx, http.StatusInternalServerError, "Invalid filename")
}
}