diff --git a/src/controllers/PackageContentController.cs b/src/controllers/PackageContentController.cs index ffd136b..28609f1 100644 --- a/src/controllers/PackageContentController.cs +++ b/src/controllers/PackageContentController.cs @@ -34,7 +34,7 @@ public async Task DownloadPackageAsync(string id, string version, { if (version is ("latest" or "next")) return BadRequest(new { message = "not allowed using latest or next version for this endpoint" }); - if (NuGetVersion.TryParse(version, out var ver)) + if (!NuGetVersion.TryParse(version, out var ver)) return BadRequest(new { message = "invalid version" }); var packageStream = await content.GetPackageContentStreamOrNullAsync(id, ver, cancellationToken);