This commit is contained in:
parent
b721c21d9f
commit
b33439656a
3 changed files with 315 additions and 197 deletions
31
src/main.rs
31
src/main.rs
|
@ -51,23 +51,20 @@ async fn launch() -> _ {
|
|||
..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)
|
||||
}
|
||||
|
|
|
@ -66,12 +66,9 @@ impl MirrorRepository {
|
|||
|
||||
None
|
||||
});
|
||||
// log::error!("Downloading {url} failed. No mirror could provide a valid response.");
|
||||
|
||||
if let Some(data) = data.1 {
|
||||
std::fs::write(file_path, data).unwrap();
|
||||
} else {
|
||||
log::error!("Downloading {url} failed. No mirror could provide a valid response.");
|
||||
}
|
||||
std::fs::write(file_path, data.1).unwrap();
|
||||
}
|
||||
|
||||
/// Get the `.db.tar.gz` content for the repository of `arch`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue