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/nuget | |
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/nuget')
-rw-r--r-- | routers/api/packages/nuget/nuget.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/routers/api/packages/nuget/nuget.go b/routers/api/packages/nuget/nuget.go index f3bc586125..3af7155fae 100644 --- a/routers/api/packages/nuget/nuget.go +++ b/routers/api/packages/nuget/nuget.go @@ -376,13 +376,7 @@ func DownloadSymbolFile(ctx *context.Context) { return } - pv, err := packages_model.GetVersionByID(ctx, pfs[0].VersionID) - if err != nil { - apiError(ctx, http.StatusInternalServerError, err) - return - } - - s, _, err := packages_service.GetPackageFileStream(ctx, pv, pfs[0]) + s, _, err := packages_service.GetPackageFileStream(ctx, pfs[0]) if err != nil { if err == packages_model.ErrPackageNotExist || err == packages_model.ErrPackageFileNotExist { apiError(ctx, http.StatusNotFound, err) |