diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2022-04-01 01:08:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-01 01:08:32 +0200 |
commit | 08d199245ade5f1c4e0898cfe67f3b635a287675 (patch) | |
tree | e8f7d47b7e842e33cb7448e321c5af0901f2b360 /routers/api/packages/container | |
parent | 242d71035a8906e2b31360386f8e4861bf4e3da8 (diff) | |
download | gitea-08d199245ade5f1c4e0898cfe67f3b635a287675.tar.gz gitea-08d199245ade5f1c4e0898cfe67f3b635a287675.zip |
Fix container download counter (#19287)
* Increment counter on manifest download.
* Refactor GetPackageFileStream method.
Diffstat (limited to 'routers/api/packages/container')
-rw-r--r-- | routers/api/packages/container/container.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/packages/container/container.go b/routers/api/packages/container/container.go index f0b1fafd26..08b6b421b0 100644 --- a/routers/api/packages/container/container.go +++ b/routers/api/packages/container/container.go @@ -367,7 +367,7 @@ func GetBlob(ctx *context.Context) { return } - s, err := packages_module.NewContentStore().Get(packages_module.BlobHash256Key(blob.Blob.HashSHA256)) + s, _, err := packages_service.GetPackageFileStream(ctx, blob.File) if err != nil { apiError(ctx, http.StatusInternalServerError, err) return @@ -506,7 +506,7 @@ func GetManifest(ctx *context.Context) { return } - s, err := packages_module.NewContentStore().Get(packages_module.BlobHash256Key(manifest.Blob.HashSHA256)) + s, _, err := packages_service.GetPackageFileStream(ctx, manifest.File) if err != nil { apiError(ctx, http.StatusInternalServerError, err) return |