From 08d199245ade5f1c4e0898cfe67f3b635a287675 Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Fri, 1 Apr 2022 01:08:32 +0200 Subject: Fix container download counter (#19287) * Increment counter on manifest download. * Refactor GetPackageFileStream method. --- routers/api/packages/nuget/nuget.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'routers/api/packages/nuget') 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) -- cgit v1.2.3