mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-06 08:08:37 +02: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:
1 parent
46a1d52235
commit
8efc4ca334
29 files changed
+73
-51
No files matched your search
@@ -31,7 +31,7 @@ func apiError(ctx *context.Context, status int, obj any) {
|
||||
|
||||
// DownloadPackageFile serves the specific generic package.
|
||||
func DownloadPackageFile(ctx *context.Context) {
|
||||
s, u, pf, err := packages_service.GetFileStreamByPackageNameAndVersion(
|
||||
s, u, pf, err := packages_service.OpenFileForDownloadByPackageNameAndVersion(
|
||||
ctx,
|
||||
&packages_service.PackageInfo{
|
||||
Owner: ctx.Package.Owner,
|
||||
|
||||
Reference in new issue
Block a user