From 7047df36d4c39fefa6464b713c66302aa0038123 Mon Sep 17 00:00:00 2001 From: JakobDev Date: Mon, 25 Sep 2023 15:17:37 +0200 Subject: Another round of `db.DefaultContext` refactor (#27103) Part of #27065 --------- Co-authored-by: KN4CK3R --- routers/api/packages/generic/generic.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'routers/api/packages/generic') diff --git a/routers/api/packages/generic/generic.go b/routers/api/packages/generic/generic.go index c5866ef9c3..30854335c0 100644 --- a/routers/api/packages/generic/generic.go +++ b/routers/api/packages/generic/generic.go @@ -89,6 +89,7 @@ func UploadPackage(ctx *context.Context) { defer buf.Close() _, _, err = packages_service.CreatePackageOrAddFileToExisting( + ctx, &packages_service.PackageCreationInfo{ PackageInfo: packages_service.PackageInfo{ Owner: ctx.Package.Owner, @@ -125,6 +126,7 @@ func UploadPackage(ctx *context.Context) { // DeletePackage deletes the specific generic package. func DeletePackage(ctx *context.Context) { err := packages_service.RemovePackageVersionByNameAndVersion( + ctx, ctx.Doer, &packages_service.PackageInfo{ Owner: ctx.Package.Owner, @@ -176,7 +178,7 @@ func DeletePackageFile(ctx *context.Context) { } if len(pfs) == 1 { - if err := packages_service.RemovePackageVersion(ctx.Doer, pv); err != nil { + if err := packages_service.RemovePackageVersion(ctx, ctx.Doer, pv); err != nil { apiError(ctx, http.StatusInternalServerError, err) return } -- cgit v1.2.3