♻️ refactor
Some checks failed
ci/woodpecker/push/build Pipeline failed

This commit is contained in:
JMARyA 2025-04-22 09:47:36 +02:00
parent fb0fa1f351
commit ff1607d623
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
3 changed files with 17 additions and 22 deletions

View file

@ -31,7 +31,7 @@ impl Mirrorlist {
impl Config {
pub fn is_mirrored_repo(&self, repo: &str) -> bool {
if let Some(mirrorc) = &self.mirror {
return mirrorc.repos.iter().any(|x| x == repo);
return mirrorc.repos.iter().any(|x| x.trim() == repo.trim());
}
false

View file

@ -56,23 +56,20 @@ async fn launch(config: String) {
..Default::default()
})
.mount_assets()
.mount(
"/",
routes![
routes::index_page,
routes::pkg_route,
routes::push::upload_pkg,
routes::user::login,
routes::user::login_post,
routes::user::account_page,
routes::ui::pkg_ui,
routes::ui::repo_ui,
routes::user::new_api_key,
routes::user::end_session,
routes::user::change_password,
routes::user::change_password_post
],
)
.mount("/", routes![
routes::index_page,
routes::pkg_route,
routes::push::upload_pkg,
routes::user::login,
routes::user::login_post,
routes::user::account_page,
routes::ui::pkg_ui,
routes::ui::repo_ui,
routes::user::new_api_key,
routes::user::end_session,
routes::user::change_password,
routes::user::change_password_post
])
.manage(config)
.manage(shell)
.launch()