feature: enable get root files

- allow get files/dirs at root repo
This commit is contained in:
Pakin 2026-01-09 11:25:33 +07:00
parent 4e3b561f61
commit 59d0dd7ab4

View file

@ -42,7 +42,7 @@ async fn checkout_handler(State(state): State<AppState>, Query(param): Query<Che
);
}
match param.path.as_str() {
legit_path if param.path.contains("/") || state.check_country_existed(param.path.as_str()) => {
legit_path if param.path.contains("/") || state.check_country_existed(param.path.as_str()) || param.path.is_empty() => {
let rpath = repo_path.unwrap().clone();
let repo = match Repository::open_bare(rpath) {
Ok(repo) => repo,