mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
Fix container download counter (#19287)
* Increment counter on manifest download. * Refactor GetPackageFileStream method.
This commit is contained in:
parent
242d71035a
commit
08d199245a
4 changed files with 7 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue