]> source.dussan.org Git - gitea.git/commit
Fix NuGet Package API for $filter with Id equality (#31188) (#31242)
authorThomas Desveaux <thomas.desveaux@dont-nod.com>
Tue, 4 Jun 2024 11:56:59 +0000 (13:56 +0200)
committerGitHub <noreply@github.com>
Tue, 4 Jun 2024 11:56:59 +0000 (14:56 +0300)
commitca414a7ccf5e26272662e360c44ac50221a0f2d4
treeb3e66318ce7101d708397b1aecfc4d0f8d9a5a12
parent331c32f9b680f0e25efe5d48ec57dfc1db194adf
Fix NuGet Package API for $filter with Id equality (#31188) (#31242)

Backport #31188

Fixes issue when running `choco info pkgname` where `pkgname` is also a
substring of another package Id.

Relates to #31168

---

This might fix the issue linked, but I'd like to test it with more choco
commands before closing the issue in case I find other problems if
that's ok.
I'm pretty inexperienced with Go, so feel free to nitpick things.

Not sure I handled
[this](https://github.com/tdesveaux/gitea/blob/70f87e11b5caf1ee441ae71c7eba1831f45897d4/routers/api/packages/nuget/nuget.go#L135-L137)
in the best way, so looking for feedback on if I should fix the
underlying issue (`nil` might be a better default for `Value`?).

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
routers/api/packages/nuget/nuget.go
tests/integration/api_packages_nuget_test.go