From b65e5d0de70660bf2572860e5c52f38b4c527ac1 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Mon, 10 Feb 2025 21:23:17 +0800 Subject: main: Prefix group names with /g/ --- main.go | 6 +++--- templates/index.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 5997e08..6819444 100644 --- a/main.go +++ b/main.go @@ -34,9 +34,9 @@ func main() { serve_source() http.HandleFunc("/{$}", handle_index) - http.HandleFunc("/{group_name}/repos/{$}", handle_group_repos) - http.HandleFunc("/{group_name}/repos/{repo_name}/{$}", handle_repo_index) - http.HandleFunc("/{group_name}/repos/{repo_name}/tree/{ref}/{rest...}", handle_repo_tree) + http.HandleFunc("/g/{group_name}/repos/{$}", handle_group_repos) + http.HandleFunc("/g/{group_name}/repos/{repo_name}/{$}", handle_repo_index) + http.HandleFunc("/g/{group_name}/repos/{repo_name}/tree/{ref}/{rest...}", handle_repo_tree) listener, err := net.Listen(config.HTTP.Net, config.HTTP.Addr) if err != nil { diff --git a/templates/index.html b/templates/index.html index 139abb0..79e3cba 100644 --- a/templates/index.html +++ b/templates/index.html @@ -13,7 +13,7 @@ -- cgit v1.2.3