From 5763c8a1c4a56fba3b6d1ca5a4875ee251f41be9 Mon Sep 17 00:00:00 2001 From: JMARyA Date: Sun, 29 Dec 2024 09:21:17 +0100 Subject: [PATCH] fix --- .woodpecker/build.yml | 1 + src/pkg/repo.rs | 4 ++-- src/routes/mod.rs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml index 7b4c3bc..3ea4b09 100644 --- a/.woodpecker/build.yml +++ b/.woodpecker/build.yml @@ -13,3 +13,4 @@ steps: username: jmarya password: from_secret: registry_token + diff --git a/src/pkg/repo.rs b/src/pkg/repo.rs index 633f71c..35affb0 100644 --- a/src/pkg/repo.rs +++ b/src/pkg/repo.rs @@ -89,7 +89,7 @@ impl Repository { .ok() } - pub fn get_pkg(&self, arch: Architecture, pkg_name: &str) -> Option { + pub fn get_pkg(&self, pkg_name: &str) -> Option { // Normalize name let pkg_name = if pkg_name.ends_with(".sig") { pkg_name.trim_end_matches(".sig").to_string() @@ -98,7 +98,7 @@ impl Repository { }; // Find package - let (name, version, _, _) = Package::extract_pkg_name(&pkg_name).unwrap(); + let (name, version, _, arch) = Package::extract_pkg_name(&pkg_name).unwrap(); let pkg = Package::new(&self.name, arch, &name, &version); // Return if exists diff --git a/src/routes/mod.rs b/src/routes/mod.rs index c202be5..d0d2d7a 100644 --- a/src/routes/mod.rs +++ b/src/routes/mod.rs @@ -89,7 +89,7 @@ pub async fn pkg_route(repo: &str, arch: &str, pkg_name: &str, ctx: RequestConte } } - let pkg = repo.get_pkg(arch, pkg_name).unwrap(); + let pkg = repo.get_pkg(pkg_name).unwrap(); if pkg_name.ends_with("pkg.tar.zst") { return respond_with(