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(hello_test)
|
||||||
.service(index)
|
.service(index)
|
||||||
.service(askama)
|
.service(askama)
|
||||||
.service(repo::git_main)
|
.service(
|
||||||
|
webx::resource("/git/{owner}/{repo}.git")
|
||||||
|
.route(webx::get().to(repo::git_main))
|
||||||
|
)
|
||||||
.service(hello_session)
|
.service(hello_session)
|
||||||
.service(chunk)
|
.service(chunk)
|
||||||
//.service(git_proto)
|
//.service(git_proto)
|
||||||
|
|
|
@ -55,7 +55,7 @@ pub struct GitWebQ {
|
||||||
branch: Option<String>,
|
branch: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[get("/git/{owner}/{repo}.git")]
|
//#[get("/git/{owner}/{repo}.git")]
|
||||||
pub async fn git_main(
|
pub async fn git_main(
|
||||||
web::Path((ownername, reponame)): web::Path<(String, String)>,
|
web::Path((ownername, reponame)): web::Path<(String, String)>,
|
||||||
web::Query(GitWebQ{commit : commitnameopt, path : pathopt, branch : branchopt}) : web::Query<GitWebQ>,
|
web::Query(GitWebQ{commit : commitnameopt, path : pathopt, branch : branchopt}) : web::Query<GitWebQ>,
|
||||||
|
|
Loading…
Reference in New Issue