From 88d054811df785b92b1b76dd91265849af8f29b3 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Wed, 12 Feb 2025 11:01:52 +0800 Subject: *: Migrate to the new path scheme --- handle_repo_raw.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'handle_repo_raw.go') diff --git a/handle_repo_raw.go b/handle_repo_raw.go index 7ed3842..d335f6a 100644 --- a/handle_repo_raw.go +++ b/handle_repo_raw.go @@ -9,10 +9,10 @@ import ( "github.com/go-git/go-git/v5/plumbing/object" ) -func handle_repo_raw(w http.ResponseWriter, r *http.Request) { +func handle_repo_raw(w http.ResponseWriter, r *http.Request, params map[string]string) { data := make(map[string]any) - raw_path_spec := r.PathValue("rest") - group_name, repo_name, path_spec := r.PathValue("group_name"), r.PathValue("repo_name"), strings.TrimSuffix(raw_path_spec, "/") + raw_path_spec := params["rest"] + group_name, repo_name, path_spec := params["group_name"], params["repo_name"], strings.TrimSuffix(raw_path_spec, "/") ref_type, ref_name, err := get_param_ref_and_type(r) if err != nil { -- cgit v1.2.3