prepare generalisation git_main
This commit is contained in:
parent
e3008262fc
commit
90ea298a61
|
@ -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)
|
||||
|
|
|
@ -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>,
|
||||
|
|
Loading…
Reference in New Issue