fix(server): actually serve archives lol
parent
30890dd8ae
commit
ce8d2d3560
|
@ -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())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue