diff options
author | JakobDev <jakobdev@gmx.de> | 2023-09-25 15:17:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-25 13:17:37 +0000 |
commit | 7047df36d4c39fefa6464b713c66302aa0038123 (patch) | |
tree | a5c471a3e8abf5cabac8de42c0fd8a814df7abf1 /routers/api/packages/generic | |
parent | 93bd4351bfb4a2f5f37ecb80d50496d044240e00 (diff) | |
download | gitea-7047df36d4c39fefa6464b713c66302aa0038123.tar.gz gitea-7047df36d4c39fefa6464b713c66302aa0038123.zip |
Another round of `db.DefaultContext` refactor (#27103)
Part of #27065
---------
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Diffstat (limited to 'routers/api/packages/generic')
-rw-r--r-- | routers/api/packages/generic/generic.go | 4 |
1 files changed, 3 insertions, 1 deletions
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 } |