diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2022-12-14 10:16:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-14 17:16:01 +0800 |
commit | 07461e18d33c78de2d6ae028f8ddba72f971db81 (patch) | |
tree | eb3f65c4eff9b9732dfa69bc49d37e44e8f6b90a /routers/api/packages/npm | |
parent | 4fb2006ca1cba98fe3851901982a3ecab252cfe3 (diff) | |
download | gitea-07461e18d33c78de2d6ae028f8ddba72f971db81.tar.gz gitea-07461e18d33c78de2d6ae028f8ddba72f971db81.zip |
Fix condition for is_internal (#22095)
depends on #22094
Fixes https://codeberg.org/forgejo/forgejo/issues/77
The old logic did not consider `is_internal`.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'routers/api/packages/npm')
-rw-r--r-- | routers/api/packages/npm/npm.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/api/packages/npm/npm.go b/routers/api/packages/npm/npm.go index 4306d5ba36..1a09cb6f36 100644 --- a/routers/api/packages/npm/npm.go +++ b/routers/api/packages/npm/npm.go @@ -405,8 +405,9 @@ func setPackageTag(tag string, pv *packages_model.PackageVersion, deleteOnly boo func PackageSearch(ctx *context.Context) { pvs, total, err := packages_model.SearchLatestVersions(ctx, &packages_model.PackageSearchOptions{ - OwnerID: ctx.Package.Owner.ID, - Type: packages_model.TypeNpm, + OwnerID: ctx.Package.Owner.ID, + Type: packages_model.TypeNpm, + IsInternal: util.OptionalBoolFalse, Name: packages_model.SearchValue{ ExactMatch: false, Value: ctx.FormTrim("text"), |