Fix container download counter (#19287)

* Increment counter on manifest download.

* Refactor GetPackageFileStream method.
This commit is contained in:
KN4CK3R 2022-04-01 01:08:32 +02:00 committed by GitHub
parent 242d71035a
commit 08d199245a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 14 deletions

View file

@ -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