prepare generalisation git_main

This commit is contained in:
hubert 2021-07-22 13:33:49 +02:00
parent e3008262fc
commit 90ea298a61
2 changed files with 5 additions and 2 deletions

View File

@ -172,7 +172,10 @@ async fn main() -> std::io::Result<()> {
.service(hello_test)
.service(index)
.service(askama)
.service(repo::git_main)
.service(
webx::resource("/git/{owner}/{repo}.git")
.route(webx::get().to(repo::git_main))
)
.service(hello_session)
.service(chunk)
//.service(git_proto)

View File

@ -55,7 +55,7 @@ pub struct GitWebQ {
branch: Option<String>,
}
#[get("/git/{owner}/{repo}.git")]
//#[get("/git/{owner}/{repo}.git")]
pub async fn git_main(
web::Path((ownername, reponame)): web::Path<(String, String)>,
web::Query(GitWebQ{commit : commitnameopt, path : pathopt, branch : branchopt}) : web::Query<GitWebQ>,