From 4a864b8538b81651fc7236892d853fdb3ef9f2a2 Mon Sep 17 00:00:00 2001 From: Yuuki Wesp Date: Sat, 31 Aug 2024 20:59:21 +0300 Subject: [PATCH] fix --- src/controllers/PackageContentController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);