fix(server): actually serve archives lol

main
Jef Roosens 2023-07-16 21:01:57 +02:00
parent 30890dd8ae
commit ce8d2d3560
1 changed files with 5 additions and 7 deletions

View File

@ -19,14 +19,12 @@ pub fn router(global: &crate::Global) -> Router<crate::Global> {
ServeDir::new(&global.config.pkg_dir).fallback(ServeDir::new(&global.config.repo_dir)), ServeDir::new(&global.config.pkg_dir).fallback(ServeDir::new(&global.config.repo_dir)),
); );
Router::new() Router::new()
.route( .route("/:repo", post(post_package_archive).delete(delete_repo))
"/:repo",
post(post_package_archive)
.delete(delete_repo)
.get(serve_repos.clone()),
)
.route("/:repo/:arch", delete(delete_arch_repo)) .route("/:repo/:arch", delete(delete_arch_repo))
.route("/:repo/:arch/:filename", delete(delete_package)) .route(
"/:repo/:arch/:filename",
delete(delete_package).get(serve_repos.clone()),
)
.fallback(serve_repos) .fallback(serve_repos)
.with_state(global.clone()) .with_state(global.clone())
} }